Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Making a module for the first timeMaking a module for the first time
Previous
 
Next
New Post
6/30/2007 4:37 AM
 
I am new to DNN and asp.net, taking my time to get  and read books and program with asp.net making data bases attaching them to modules and running them.  Later on I am planning on making a web site including forum and wiki using dnn, but would like to understand how to write modules and add my own programs  the dnn platform.
 
So far so good,
I wrote a module that allows a user to add books to a list in a data base, and search for books within that data base, this module works when I run,
 
But when I add it to the dnn module (which I am able to do) when It loads it does not show the grid inputs that are there, so you can not see any thing within the module.
I take it some script has to be added to a module first to change it so it will run correctly in dnn, is this the case?
Just to recap, the module works 100% when run as a standard web page, I can load it into dnn as a module, but when I add it to a page, there is no content,
I have added a data base table and in the desktop module part I have added one simple file, this works fine until adding it to dnn
The top two lines in the module.ascx
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="AddBooks.ascx.vb" Inherits="DesktopModules_Bookslist_AddBooks" %>
&nbsp;
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>"
 
All the lines in the module.ascx.vb
Imports DotNetNuke
Imports System.Web.UI
Imports System.Collections.Generic
Imports System.Reflection
Imports DotNetNuke.Security.PortalSecurity
 
Partial Class DesktopModules_Bookslist_AddBooks
 
    Inherits Entities.Modules.PortalModuleBase
 
End Class
 
What can I add to make the module work with DNN ?, thank you  
 
New Post
6/30/2007 10:12 AM
 

I think the problem is with the SQLDataSource. To see the reccomended way of connecting to the database see:

http://www.adefwebserver.com/DotNetNukeHELP/DNN_ShowMeThePages/

Dim mySqlString As New StringBuilder()
mySqlString.Append("SELECT FriendlyName, Description ")
mySqlString.Append("FROM {databaseOwner}{objectQualifier}DesktopModules ")
mySqlString.Append("WHERE Description like '%' + @SearchString + '%' ")
mySqlString.Append("ORDER BY FriendlyName")
Dim myParam As SqlParameter = New SqlParameter("@SearchString", SqlDbType.VarChar, 150)
myParam.Value = SearchString
Me.GridView1.DataSource = CType(DataProvider.Instance().ExecuteSQL(mySqlString.ToString(), myParam), IDataReader)
Me.GridView1.DataBind()


Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
6/30/2007 10:28 AM
 

Hi Micheal thank you for the information,

 

dare i ask, where do i put the information you have taken the time to paste ? in the ascx file or the ascx.vb file ? or in a web.config file.

thank you for your time.

 

( i am in thailand at this time, all the time in the world, but cannot get a dnn book any where, have a freind coming over in a few weeks and he is going to bring a few books out,  CANT WAIT)

 
New Post
6/30/2007 11:55 AM
 

It is in the ascx.VB file. Also, this is free:

DotNetNuke® 4 Module Development Guide (Download .PDF)



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
7/1/2007 1:13 AM
 

Hi Micheal

thank you again for your time and suggestions,

I am not sure if i have explained correctly or if i am missunderstanding.

I wrote a module which when run (not through DNN) works fine, can up load, edit and search the data base from the module, but when i add it to and run it with  dnn, there is nothing shown on the actaul web page, the content is missing, through i did add one piece of text which does appear,

After reading through some of the online ducomentaion could it be i need to set up another file for (UI) user interface,  My module consists of anascx file and a ascx.vb file, which connect to a data base to draw the information

i have tried to read some of the documentaion regarding module from the site, but i personally found reading this is hard going and cannot find parts that help me to understand any futher. To be polite i found some of the reading very difficult to follow, maybe it is as a lack of knoweldge on my behalf or maybe i am from a culture of dummies reading and paint by numbers

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Making a module for the first timeMaking a module for the first time


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out