aDEFWEBSERVER
Los Angeles, CA *  Webmaster@ADefWebserver.com

Creating a DotNetNuke Module For absolute beginners!
For DotNetNuke Version 4 - Page 2 (Page 1)

Setting Up The Module

If you have followed the directions on this page you may have already set up a sample module. If you haven't already done so it would be best to do so now. This will give you practice that will make the rest of this tutorial easier. Follow the directions to set up any module but do NOT name it "GuestBook" because we will be using that for this tutorial.

VERY IMPORTANT. Click once on the root directory in the Solution Explorer Window. Doing so will ensure the starter module code is created in the proper place.
Select FILE from the toolbar then New File.
On the next menu, click once on DotNetNuke Module (under My Templates), select "Visual Basic" from the Language dropdown, type "GuestBook." in the Name box and click Add.
(I interrupt this tutorial for an important warning)

 

exclamation markNOTE: If the files DataProvider.vb,
GuestBookController.vb,
GuestBookInfo.vb, and SqlDataProvider.vb
in the "ModuleName" directory are under "DesktopModules/App_Code" then they are in the wrong place.

Click on the "ModuleName" folder and drag it under the "App_Code" directory that is directly under the main root of the website.

You will also have to move the "DesktopModules/ModuleName" folder and drag that "ModuleName" folder so it is under the "DesktopModules" folder that is directly under the main root of the website.

(This is the correct way it should look)

(Now back to the tutorial)

A very helpful help page comes up and instructs you to

Rename /App_Code/ModuleName to /App_Code/GuestBook

and

Rename /DesktopModules/ModuleName to /DesktopModules/GuestBook

Make the changes by right-clicking the folder name in the Solutions Explorer and selecting Rename from the menu. You have to do this 2 times. Once for the folder under "App_Code" and one time for the folder under "DesktopModules"  
From the toolbar select BUILD then BUILD WEB SITE
The website should build without errors.
In the SOLUTION EXPLORER right-click on the "Default.aspx" page and select SET AS START PAGE.
From the toolbar select DEBUG then START WITHOUT DEBUGGING

(You may wonder why I am not covering debugging. While creating this tutorial I ran into permissions problems on my own machine. They are easily fixed but I wanted to avoid any unneeded complexity. If you need help debugging see this post.)

The website should now come up.
Click LOGIN
Log in as "host" The password (if you haven't already changed it) is "dnnhost"
Click on the HOST menu and select SQL
The form will display.
Switch back to Visual Studio and in the Solution Explorer. Double-click on "01.00.00.SqlDataProvider" in the "DestopModules/GuestBook" directory so that it shows up in the main window.
Click once on the page, then from the toolbar select EDIT then SELECT ALL (Ctrl +A)
Then EDIT and COPY (Ctrl +C).
Switch back to the DotNetNuke website and paste (Ctrl +V) the script you copied into the window, click the "Run as Script" box and click EXECUTE.

Again, watch the progress bar in your web browser because when the script has been run the text in the window will shift and then... nothing...

From the HOST menu select "Module Definitions"
Click the small down arrow in the upper left hand corner of the Module Definitions menu and select "Import Module Definition"
Select "GuestBook.dnn" in the Module Manifest drop-down and click Import Manifest
Under the PAGE FUNCTIONS menu click ADD
In the PAGE DETAILS menu:
  • Enter "Guest Book" for PAGE NAME
  • Enter "Guest Book" for PAGE TITLE
  • Enter "Guest Book" for DESCRIPTION
  • Click the VIEW PAGE box next to ALL USERS

Then click UPDATE

From the MODULE drop-down select "GuestBook"
Then click ADD
If you get "Object reference not set to an instance of an object" error just click on the "GUEST BOOK"  link.

(However if you are running DotNetNuke on a machine that is lower than a Pentium III with 512k of Ram then DotNetNuke will regularly throw this error).

The module should now appear.
   
   
   
   
   
   

BACK
 

Next: The DotNetNuke Module Structure

 

   
   
   
DotNetNuke MarketPlace

(C) by Michael Washington - ADefWebserver.com - Webmaster@ADefWebserver.com

DotNetNuke is a registered trademark of Perpetual Motion Interactive Systems Inc.