Blog

Most Recent Blog Entries

Oct 7

Written by: Brian Dukes
10/7/2008 9:32 AM 

It shouldn't be hard to get started writing a module for DotNetNuke, but it doesn't seem like there's a whole lot of help especially when you are wanting to use C#.  At Engage, we have created a Visual Studio project template which will get you started developing a C# DotNetNuke module, using a Web Application project (rather than the, in my opinion, much more cumbersome Web Site project).  It is available for free on our downloads page after registering on the site.

The template will get you started with the basics of a DotNetNuke module, providing basic placeholder controls (for view, edit, and settings), base classes to use for your module controls and your settings control, a manifest and NAnt build file to easily package your module, and the basic starting point (and sample code) for your business controller class and data provider.  It should really speed up how you start a new module, and free you from always copying your last module and then having to figure out what to delete and what to leave.

To use the template, put the downloaded zip file into the C# web templates folder for Visual Studio.  This is typically in My Documents/Visual Studio [2005|2008]/Templates/ProjectTemplates/Visual C#/Web (you might have to create the Web folder yourself).  This will make the new project type appear under the Web node for C#, in the My Templates section, when you create a new project.  You might also want to open up the zip file and alter the template manifest (C# Compiled Module.vstemplate) to include your company name (replace the values in the CustomParameters section where it says YourCompany).

Please check it out, we hope it helps you out.  Happy module building!

Tags:

2 comment(s) so far...

Re: C# Compiled DotNetNuke Module Template

Thnaks for this. I am trying it now.

The Nant build fails looking for the solution file. If I amemd the build script to look in the parent folder it works. There are a few ways this could be done:

1 Modify the subproject.name variable to be prefixed with ../
2 Modify the compile target similarly
3 Create a new variable subproject.dir and use that in the compile target
4 Ways I haven't thought of ...

What would you think is the best way to fix this?

Regards

Neil


By neilx on   3/8/2009 6:15 AM

Re: C# Compiled DotNetNuke Module Template

thank you for this source code
i hope it will help me to build my module

By almny.com on   5/5/2009 11:25 PM

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Add Comment   Cancel 

Purchase

Please click here to buy now.
Payment will be processed via PayPal.

Test Drive!

Want to find out how it works? Visit our demo site to see the modules in actions!

Subscribe

Sign up for our newsletter and get the latest product updates!

Online Support

Powered by DotNetNuke