aDEFWEBSERVER
Los Angeles, CA *  Webmaster@ADefWebserver.com

Creating a DotNetNuke® Module Using CodeSmith Tools - Page 2 (Page 1)

Configure DotNetNuke

The point of using the CodeSmith templates is that you only have to create a table (that has a primary key) and the templates will create the beginning of a module for you.

Beginners may be tempted to use this thinking this is easier. This is not recommended. You will inevitably have to alter the module and knowledge of the DotNetNuke framework is required to do so.

At the minimum you should read: Super-Simple Module (DAL+)

 

 

Open Visual Studio (or Visual Web Developer) and from the toolbar, select File then Open Web Site

 

Select the root of your DotNetNuke site

 

From the toolbar, select Start Without Debugging

 

When the site comes up in the web browser, log in as the Host account

 

From the Host menu, select SQL

Paste the following into the box (this will create the table used in this tutorial):

CREATE TABLE {databaseOwner}[{objectQualifier}YourCompany_GuestBook] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[ModuleID] [int] NULL ,
[Name] [nvarchar] (50) NULL ,
[Email] [nvarchar] (50) NULL ,
[Message] [nvarchar] (250) NULL ,
[DateEntered] [datetime] NULL
) ON [PRIMARY]

GO

ALTER TABLE {databaseOwner}[YourCompany_GuestBook] ADD
CONSTRAINT [PK_{objectQualifier}YourCompany_GuestBook] PRIMARY KEY CLUSTERED
(
[ID]
) ON [PRIMARY]

 

 

 

 

Ensure Run As Script is checked

Click the Execute link

   

BACK
 

Next: Install CodeSmith

 

 

Buy DotNetNuke Modules from Snowcovered

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

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