Los Angeles, CA *

Creating a


DotNetNuke Module
For absolute beginners! (For DotNetNuke Version 4.3 or higher)

This tutorial is outdated.

The following tutorial is recommended:

Creating a DotNetNuke Module using LINQ to SQL (Start here!)


DotNetNuke DAL+



To use this tutorial you need:

  1. Visual Studio Express (download)
  2. SQL Server Express (download)
  3. DotNetNuke (download)
(this tutorial was made for version 4.3 or higher)

Tutorial Series:

Also see:
 The ADefWebserver DotNetNuke HELP WebSite

(you can download the finished module and the source code in VB.NET here)

This tutorial is in VB.NET but you can obtain the source code in C# here.

Also, there is a slight change you need to make to your development environment to program DotNetNuke modules in C#. these directions can be found here.

(C# courtesy of Guy Ellis)


Let's say your boss just gave you an assignment to create a "Trading Post" type of module for the company intranet that is running on DotNetNuke. In the past you would have spent nearly half an hour just setting up the development environment and hours creating the Data Access Layer (DAL) and the code.

All that has changed with the recent enhancements to DotNetNuke and the DAL in the creation of the DAL+.

This tutorial will show you how to create a DotNetNuke module using the new DAL+, an extended feature set of the DotNetNuke Data Access Layer (DAL).

The goal of this tutorial is to show how DotNetNuke module development is now Super-Fast and Super-Easy. The sample module consists of only 4 files:
  • A Web User Control
  • A code behind file for the Web User Control
  • A simple class file to hold the data
  • A "controller" class to connect to the database


1. Install Visual Studio Express if you haven't already done so. (download)

2. Install SQL Server Express if you haven't already done so. (download)

3. Follow one of the the options below to install DotNetNuke and to create a DotNetNuke Website:

4. In Visual Studio, select "Build" then "Build Solution". You must be able to build it without errors before you continue.


Are you Ready to Create the Module?

You must have a DotNetNuke 4 website up and running to continue. If you do not you can use this link and this link to find help.

DotNetNuke is constantly changing as it evolves so the best way to get up-to-date help and information is to use the DotNetNuke message board.

I am sorry I will not be able to respond to individual requests for help on set-up issues. I will be able to help on issues related to the module this tutorial covers.


The Sample Module

You should be able to see Macromedia Flash demonstration of the module by clicking the PLAY button on the image below.

exclamation markIf the PAUSE button is showing you can click it once and the PLAY button will then show. Clicking the PLAY button again will start the movie from the beginning.



The DAL vs. The DAL+

Using the normal DotNetNuke Data Access Layer (DAL) design, we would create a database provider class that communicated with the database and overrode methods in an abstract class (Data provider). This class sits between the database provider class and the Business Logic Layer (BLL). This would have allowed us to substitute an alternate database provider class to communicate with other databases.

In this tutorial we will be demonstrating the DAL+. The DAL+ is an alternative method of communicating with the database. This method will still allow us to communicate with an alternate database if DotNetNuke is running using an alternate provider that supports DotNetNuke 4.3 or higher (or DotNetNuke 3.3 or higher).

However, unlike the traditional DAL the DAL+ is not 100% "portable" to other data sources. It's is best used for modules that will not be distributed to other DotNetNuke sites that may need to run on databases other than Microsoft SQL Server. For those situations it is best to use the traditional DAL that is described in this tutorial.

From: "DotNetNuke Module Developers Guide"
Copyright 2003-2005 Perpetual Motion Interactive Systems, Inc. All Rights Reserved.


The sample module this tutorial covers, demonstrates most of the functions you would need including: "Select", "Delete", "Update", and "Insert".

This tutorial also shows you how to use Object Data Sources.

Using the techniques in this tutorial you will save a massive amount of code that you would have to write if you wrote the exact same module in ASP.NET 1.1.

Next: Setting Up The Module


DotNetNuke MarketPlace


(C) by Michael Washington - -

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