How to create a custom module in DNN 6

1. Download and install Visual Studio Starter Kit from the following link

http://dotnetnuke.codeplex.com/releases/view/78212#DownloadId=313768
 

2. Now you can open your DNN website Folder in visual studio 2010 by File -> Open Website -> select the website folder.
 

3. Right click your solution from solution explorer and select Add New Item -> choose - Visual c# -> DotNetNuke Dynamic Module and give Module Name. (for eg. My module Name is  NewsandEvents).



4.  Follow the Important Instruction in your visual studio. (i.e) In solution Explorer -> App_code/ModuleName Replace as Philip.NewsAndEvents and In DesktopModule Folder replace DesktopModule/ModuleName as Philip.NewsAndEvents.

5.In Web.config Add the follwing code

<codeSubDirectories>
               <add directoryName="Philip.NewsAndEvents" />
     </codeSubDirectories>


6. If you are working in visual studio 2010, you can also include the following code

<httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="2097152" requestLengthDiskThreshold="8192" requestValidationMode="2.0" />
 

7. Build the website and set start page as Default.aspx and run the website.

8. Login into super user account and choose Host -> SQL

9. Back to visual studio In DesktopModules -> NewsandEvents -> Double Click 01.00.00 SqlDataProvider


10. Edit -> SelectAll (or) ctrl+A, Select All the SqlScript and copy (ctrl+c).



11. Back to Web-Browser Paste your SqlScript Into Script Field.



12. Select Run as script and click Execute.

13. Now you can select Host -> Extensions
14. In extensions select Manage -> Create New Module

15. In create module from -> Select Control and Module folder field -> select Philip.NewsAndEvents, it will automatically bind EditNewsAndEvents.aspx in Resource field. Then give your ModuleName.
If you select Add test Page, it will create a new page for your module.


16. In Visual studio select DesktopModules/NewsAndEvents/NewsAndEvents.ascx , delete the existing code and add your own Asp.net code


 




17. NewsAndEvents.ascx.cs delete existing code and add Page_Load Event 

 



18. Build and execute the website. You have successfully create a DNN module.

3 comments:

  1. Your information about DNN6 website creating with Dotnet nuke with good screen shot. it is very good for users. Thank you

    Hire Dotnetnuke Developer India

    ReplyDelete
  2. very useful . thanks buddy

    ReplyDelete
  3. yes its very useful. thnx

    ReplyDelete