DNNTipsandTricks Over and over I see DotNetNuke modules whose settings pages are created using the utilitarian look of the default DotNetNuke settings.  I personally don’t care for this appearance since the layout relies very heavily on the use of tables.  I really wanted to style my settings page along the lines discussed in the recent Sitepoint article on Fancy Form Design Using CSS.  Unfortunately, if you setup your module to use the standard settings page, then you do not have control over the stylesheets.  Unlike the standard page, your module.css is not injected into the page when viewing the settings page.  Sure, your users could go into the Site Settings and edit the portal.css, but that is probably beyond the skills of most administrators.  Instead, with a little bit of code in your module, then you can add your module.css to the page.

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim DefaultPage As CDefault = DirectCast(Page, CDefault)
    DefaultPage.AddStyleSheet("simplemenustyles", String.Format("{0}/module.css", Me.ModulePath), True)
End Sub

After adding this code and the appropriate styles to my module.css I now have complete control over the look of my settings within the module settings page.

SimpleMenuSettings