Create DNN 5 Module

1. Install DNN starter Kit and "Open Site" with Visual Studio

2. Right-click the project, "Add New Item", "Dynamic DNN Module" (select C#)

3. Read the readme file! (change module name in admin & desktopmodules foders, and fix web.config for allowing .cs files)

4. Open browser, Host, Module Definitions, "Create New Module"

5. Edit created module (click the pencil on the left of the module name)

6. Click "Add Definition" and enter exactly the name of the module

7. Click "Add Module Control" and insert the 3 pages (view, edit, settings)

For View
- Key: none
- Source: ViewMyModule.ascx
- Type: View
- Title: MyModule

For Edit
- Key: "edit"
- Source: EditMyModule.ascx
- Type: Edit
- Title: MyModule Edit

For Settings
- Key: "settings"
- Source: Settings.ascx
- Type: Administrator
- Title: MyModule Settings

8. Open ViewMyModule.aspx.cs and comment code inside try/catch in Page_Load event (inside if (!Page.IsPostBack))

9. Add your module to a page!

Resources (DNN4 version only)
http://blog.dmbcllc.com/2008/05/29/dotnetnuke-modules-registering-your-module/

Comments

  1. Obrigada pelo resume :P

    ReplyDelete
  2. How do I install the DNN Starter kit? There doesn't seem to be any instructions anywhere. If you have a link, please add it. thanks.

    ReplyDelete
  3. To install DNN you can open the project's source code with visual studio and start it. It should open the install folder and follow up the wizard for setting up the database and permissions. You can also try creating an IIS web site to the project.
    The starter kit (http://dotnetnuke.codeplex.com/releases/view/55790#DownloadId=167725) should run easily. If you're having trouble, try right-click the file, properties and "unblock" and then running "as admin".

    More info here:
    http://forums.asp.net/p/937685/1114393.aspx

    ReplyDelete

Post a Comment

Popular posts from this blog

Mobile development opportunities

Breaking down document locking in SharePoint

Working around X-Frame-Options for iframes