(VB) DNN 5 module development tutorial - part 1: The tools

1. June 2010 22:31

This is a re-work of the C# module tutorial series to suit VB developers. It uses newer versions of Visual Studio and DNN, but otherwise it is pretty much the same as its C# sibling.
Credits for the VB code goes to my friend Kai Joussen who made this possible.
But now, to the Visual Basic module action...

So, you want to create your own DNN modules, but don't know how? Started programming with the Visual Studio Starter Kit but got stuck because it seems so... complicated? Fear not. There is no über advanced programming neccessary. Once you get a grip on how it all fits together you will wonder what all the fuss was about.
In this tutorial series I will assume that you have at least basic skills in ASP.NET development. I will also frequently skip over info and procedures you easily can google yourself.
So, since this is meant to be a tutorial, let's start from the beginning and look at what you need to get some serious module dev action.
Of course there are several setups and practices regarding the development of DotNetNuke modules, but this tutorial will use the following:

  • DotNetNuke 5 installed and running locally on IIS
  • Visual Studio 2010 Professional
  • SQL Server (SQL Server Express will work just as well)
  • DotNetNuke Visual Studio Starter Kit

In this tutorial series I use version 5.4.2 of both DotNetNuke web application and Visual Studio Starter Kit.
If you still use Visual Studio 2008, don't get too worried. The differences aren't that big and I tried to use procedures that should work fairly well in VS 2008 too.

DotNetNuke installation

Make sure you have IIS installed, configured and running on your machine. This tutorial won't cover setting that up since there is tons if guides for that out there.
Next, download the new install version of DotNetNuke. You'll find the latest version under "Recommended Download" in the downloads section of DNN's project page on CodePlex. To simplify things i suggest you do not use the source code version since this will make things slower and possibly confuse you, since all the source files for DotNetNuke will be in your installation.
I have DotNetNuke installed in the web root of my local web server, but installation in a virtual directory works fine too.
To install, simply unzip the contents of the installation package from CodePlex into your web root or virtual folder. Now set up an empty database in SQL Server or SQL Server Express. Point your web browser to your DotNetNuke installation, e.g. "http://localhost" or "http://localhost/MyDnnInstallation". This will start the installation wizard, which I won't go through in detail either. Read the info on the screens carefully when you go through it and you should be fine.

Visual Studio Starter Kit

The Visual Studio Starter Kit will help you with templates for our new module. It can also be downloaded from CodePlex under "Other Available Downloads". The installation is very simple so I won't go into that at all. The starter kit contains templates for both C# and Visual Basic and installs them for both Visual Studio 2008 and 2010 (probably also for 2005, but I have not verified this myself).

Now we have the tools ready, so the next part will be about starting our first module project and take a look at what is in the templates.

Tags: , , ,

DotNetNuke | Modules | Tutorials


6/15/2010 11:57:23 PM #

Ken Ingram

Johan, I really enjoyed your tutorial.  I am creating a module that displays a TreeView control.  It's working fine except the styling. I wanted to set the styling in the control, but it looks like the container or page is overriding it. This is my declaration of the TreeView control.  Can this be done?
Ken Ingram

<asp:TreeView ID="TV" runat="server" EnableClientScript="false"
            RootNodeStyle-ForeColor="DarkBlue" ParentNodeStyle-ForeColor="DarkGreen" LeafNodeStyle-ForeColor="Black">

Ken Ingram United States |

6/16/2010 10:25:56 AM #


Actually, I have never used a TreeView control in a module so I have no first-hand experience of your problem. But it seems strange that it does not work the way you want.
On the other hand, my experience of TreeView controls in general is that they are full of surprises... Smile

So sorry I can't help you out. Have you tried the DotNetNuke forum?

Johan Sweden |

6/17/2010 12:27:28 AM #

Ken Ingram

Well I figured it out.  I looked at the way it was rendered and then added the following code to the portal.css file (module name is HSLinks):

In the HSLinks TreeView control,
the first css element controls level one
the second css element controls level two
.HSLinksContent td + td a
.HSLinksContent td + td + td a

Ken Ingram United States |

6/17/2010 10:00:45 AM #


Great! I still think your first try should have worked also. But the path of DNN is not always straight... ;)

Johan Sweden |

4/19/2012 7:43:54 AM #

Magento Developers

There are a number of different ways you can go about installing DotNetNuke, and which route you take will depend on the platform and software you are using. Before you should probably check out the Installation Requirements :

* Database
* Web Server
* Framework
* Hardware

Magento Developers India |

9/27/2013 9:02:55 AM #


i create one module in DNN5 but its not add for the page ....... any one tell to  me  what problem is there

thilip France |

Comments are closed

About the addict

Johan Seppäläinen lives in Uppsala, Sweden. He spends most of his days working as a systems architect/developer, specialized in solutions built on Microsoft platforms.
Occasionally there is time for some recreational coding, when he pursues optimal solutions and code zen, mainly in C#. When he is not writing in this blog, that is.