Click here to Skip to main content
15,439,556 members
Articles / Web Development / ASP.NET
Posted 12 Feb 2004


39 bookmarked

Automated Module Creation Tool for DotNetNuke

Rate me:
Please Sign up or sign in to vote.
3.89/5 (9 votes)
23 Feb 20043 min read
An automated approach to module creation for the DNN framework

Sample Image - CreateModuleTemplate.jpg


DotNetNuke is an excellent portal framework built with ASP.NET. We are currently using it to build a content management system for our corporate intranet. One of the nice things about DNN is that it is modularized - you can create custom modules that are easily integrated and moved around within the framework. They can also be distributed to other web sites based on the DNN framework.

Why a tool?

Creating a new module is fairly simple, but it does take some work in regards to developer and admin time. A sample module was distributed with the documentation. Creating a new module is based largely on cutting and pasting the module info from this document, tweaking it to include the name of your new module class, tying it in the edit module, creating a separate mobile module, building and then registering everything on the website itself. It is a tedious process, and just getting the "basic shell" setup can take up otherwise valuable developer and admin time.


This tool, which is itself a DNN module, will assist the developers by creating the:

  • Module ascx and vb
  • EditModule ascx and vb
  • MobileModule ascx and vb
  • Registering the module with DNN

All in one quick easy step. The picture above will give you a basic clue how this looks and works. The main page was based off of DNN's own Module Properties page, but has been greatly enhanced with JavaScript to automate the process.


The module is also easily customized. You can choose which modules will (or will not) be created by default simply by using checkboxes. The templates themselves are based on text files, which can be customized online using CreateModuleTemplate, or by hand using your favorite editor. This allows you create module templates with your own tweaks built in.

Try it out

The download above contains the full code, and complete, detailed documentation on how the process works, including lots of images. But honestly, the process is so easy, you won't need it :)


If you do use CreateModuleTemplate - do me favor, and drop me an email to let me know how you like it, and if it is working for you. All the info is in the download. If you have any suggestions or enhancements (or bug fixes) please let me know so I can update the code.

DNN 2.0

DNN 2.0 beta1 was released on Feb 14, 2004. I have created a new version of CreateModuleTemplate that works with DNN2b1. Please make sure that you download the correct version of CMT for your DNN portal. Please note that this version is extremely new, and hasn't been extensively tested, nor does it take advantage of all the features available in DNN2b1. What it will do is create the module templates and register them in the most generic way possible for quick and smooth addition. The "icon" feature has been removed in this version (no icon is assigned by default), and the "version" field has been added, but no JavaScript is hooked up to that yet. Note that the docs are the same ones from v1, as nothing has functionally changed.

Warning: Since this is beta code running on a beta framework, I'd strongly suggest that it not be used in a production environment. As new changes appear in DNN2, this code may cease to function. Use at your own risk.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Written By
Systems Engineer Virtual RadioLogic
United States United States
Todd Davis has been working in web and application development for several years, using Silverlight, ASP.NET, VB.NET, C#, C++ and Javascript, as well as a great deal of work with SQL server and IIS.

He currently works for Virtual Radiologic in Eden Prairie, MN, however he is better known for his varied work in the open source community, especially the DotNetNuke project for which he provided several world-renowned training videos and modules. A huge advocate of open source and open knowledge sharing, everything on his website ( is always offered for free.

Whenever he is not actively coding at his laptop (a rarity to be sure), he can be found woodworking, walking with his wife and kids, or motoring along the back roads of MN on his Harley Davidson Fatboy.

Comments and Discussions

GeneralYou Rule Pin
leotta17-Sep-05 3:40
Memberleotta17-Sep-05 3:40 
GeneralDoes this work with 3.1 Pin
peternolan911-Jul-05 5:25
Memberpeternolan911-Jul-05 5:25 
GeneralRe: Does this work with 3.1 Pin
Todd Davis11-Jul-05 5:30
MemberTodd Davis11-Jul-05 5:30 
GeneralRe: Does this work with 3.1 Pin
peternolan911-Jul-05 5:57
Memberpeternolan911-Jul-05 5:57 
QuestionHow To Install This Utility Pin
ales_pac6-May-05 4:16
Memberales_pac6-May-05 4:16 
AnswerRe: How To Install This Utility Pin
ales_pac6-May-05 4:19
Memberales_pac6-May-05 4:19 
GeneralCreating a DotNetNuke Module using notepad Pin
defwebserver12-Oct-04 7:53
Memberdefwebserver12-Oct-04 7:53 
QuestionDNN 2.1.2 compatible ? Pin
Paul Chu1-Sep-04 15:59
MemberPaul Chu1-Sep-04 15:59 
AnswerRe: DNN 2.1.2 compatible ? Pin
Todd Davis2-Sep-04 4:13
MemberTodd Davis2-Sep-04 4:13 
GeneralRe: DNN 2.1.2 compatible ? Pin
Paul Chu2-Sep-04 11:09
MemberPaul Chu2-Sep-04 11:09 
GeneralAutomate daily email reports using ASP.NET & SQL Server!! Pin
Member 251492718-Jul-04 23:41
MemberMember 251492718-Jul-04 23:41 
GeneralRe: Automate daily email reports using ASP.NET & SQL Server!! Pin
Anonymous9-Nov-04 21:05
MemberAnonymous9-Nov-04 21:05 
GeneralRe: Automate daily email reports using ASP.NET & SQL Server!! Pin
Catalin Hatmanu3-Nov-05 11:05
MemberCatalin Hatmanu3-Nov-05 11:05 
GeneralC++ Port Pin
Dharmesh Shah30-May-04 2:54
MemberDharmesh Shah30-May-04 2:54 
GeneralDLL missig Pin
zayoun14-May-04 13:01
Memberzayoun14-May-04 13:01 
GeneralDNN 2.0b Install Pin
HRybko24-Feb-04 10:40
MemberHRybko24-Feb-04 10:40 
GeneralRe: DNN 2.0b Install Pin
Todd Davis24-Feb-04 12:03
MemberTodd Davis24-Feb-04 12:03 
GeneralRe: DNN 2.0b Install Pin
Chasin Stanley9-Mar-04 14:48
MemberChasin Stanley9-Mar-04 14:48 
GeneralThanks! Pin
Rick Engelking14-Feb-04 3:41
professionalRick Engelking14-Feb-04 3:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.