Archive for January 23, 2008

Creating DotNetNuke 4 Modules with LINQ

DotNetNuke is awesome, I can’t believe I have lived without it for these many years as a .NET developer. It’s a plug-and-play website with tons of useful features that you can simply insert into content panes in a matter of seconds. Things like blogs, surveys, shopping carts, reports… you name it, there will already be a DotNetNuke module available online for it.

What is a DotNetNuke module? It’s a feature that you add to a DotNetNuke site; for example, FAQ is a module you drop into your DNN site once its installed on the site correctly. Similarly, shopping carts, blogs and surveys are also built-in modules that come with DNN 4 when you install the site on a web host.

But what happens if you want to create your own module? Good question. That’s what I’m about to find out from Michael Washington’s tutorial:

http://www.adefwebserver.com/dotnetnukehelp/LinqTutorial/LinqTutorial2.htm

The tutorial also gives you hands on experience with LINQ, for anyone (like myself) that doesn’t have much exposure to the technology.  Here are the basic steps for creating DotNetNuke 4 Modules with LINQ:

  1. Setup Your Project
  2. Create Tables
  3. Setup the Module
  4. Create LINQ to SQL Class
  5. Create the Module
  6. Create the Code-Behind
    1. Code-Behind for LINQ Datasource Control
    2. Code-Behind for Add My Listing Link
    3. Code-Behind for the Gridview (if any)
    4. Add additional Methods to the Code-Behind
  7. Create the Module Definition