-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRemoveDefaultCss.cs
More file actions
32 lines (31 loc) · 983 Bytes
/
RemoveDefaultCss.cs
File metadata and controls
32 lines (31 loc) · 983 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.Web.UI;
using ClientDependency.Core.Controls;
namespace Connect.DNN.Modules.SkinControls
{
public class DefaultCssExclude : Control
{
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
var filePath = string.Concat(DotNetNuke.Common.Globals.HostPath, "default.css");
var loader = Page.FindControl("ClientResourceIncludes");
if (loader != null)
{
ClientDependencyInclude ctlToRemove = null;
foreach (ClientDependencyInclude ctl in loader.Controls)
{
if (ctl.FilePath == filePath)
{
ctlToRemove = ctl;
break;
}
}
if (ctlToRemove != null)
{
loader.Controls.Remove(ctlToRemove);
}
}
}
}
}