Tell Your DotNetNuke Module Setting Page To Load Module.css

By default, module.css does not get loaded for a module's setting page.  To let it load the file, add the following code (in C#) to your module setting code behind file (settings.ascx.cs):

protected void Page_Load( object sender, System.EventArgs e ) {
    DotNetNuke.Framework.CDefault DefaultPage = (DotNetNuke.Framework.CDefault)Page;
    DefaultPage.AddStyleSheet( "ModuleSettingStyles", string.Format( "{0}/module.css", this.ModulePath ), true );
}

Debugging a DotNetNuke Compiled Module in VS2008

If you are using VS2008 to create a DNN module with a compiled module starter kit, one option is to attach the project to w3wp.exe process.  You can access it via Debug > Attach to Process... menu.

stolenbit_attach_to_w3wp

If attaching the project to w3wp.exe doesn't seem to be an option somehow (e.g. you just cannot find it), what you need to do now is to modify some project settings as shown below.

In my case, I've create a host record with local.dotnetnuke as the host name.  In your case, you may want to replace http://local.dotnetnuke with http://localhost/dotnetnuke, for example.  Please note that I've saved my project under /DesktopModules/ContactUsForm.  So my project url becomes http://local.dotnetnuke/DesktopModules/ContactUsForm.

stolenbit_debugging_dotnetnuke_compiled_module_vs2008

Save the project and try running it again.  You should now be able to debug the project Wink

Cannot Resolve Collation Conflict for Column n in SELECT Statement

When creating a stored procedure and it contains a SELECT statement, you may get the following error message even if the collation of your database seems to be correct.

Cannot resolve collation conflict for column n in SELECT statement.

where n is the column number.

This can be easily fixed by appending the following portion of SQL to the column n in your SELECT statement:

COLLATE <your database collation name>

For example, COLLATE SQL_Latin1_General_CP1_CI_AS.