CSS In DNN Modules

If your module has a file named module.css in the root of the module folder, it will automatically get included on the page with the module.

For other CSS and for JavaScript, you should use the Client Resource Management framework to include the resources you want. Something like this:

<%@ Register TagPrefix="dnn" 
    Namespace="DotNetNuke.Web.Client.ClientResourceManagement" 
    Assembly="DotNetNuke.Web.Client" %>
 
<dnn:DnnCssInclude runat="server"
    FilePath="~/DesktopModules/MyModule/css/the-style.css" />
<dnn:DnnJsInclude runat="server"
    FilePath="~/DesktopModules/MyModule/js/the-script.js"
    ForceProvider="DnnFormBottomProvider" />

Tags:

Dotnetnuke