This is a migrated thread and some comments may be shown as answers.

stylesheetmanager can't add css from code behind

1 Answer 63 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 28 Jan 2014, 11:32 AM
Hi there

I'm trying to add a css file from code behind but I notice that I get this error:

Skipped loading 1 invalid resource.

Dim stylesheetItem As StyleSheetReference = New StyleSheetReference()
stylesheetItem.Path = "~/App_Themes/test.css"
StylesheetManager1.StyleSheets.Add(stylesheetItem)

On my master theme I got:
  <telerik:radstylesheetmanager ID="StylesheetManager1" runat="server" EnableStyleSheetCombine="true">
        <StyleSheets>
            <telerik:StyleSheetReference Path="~/App_Themes/common.min.css" />
        </StyleSheets>        
    </telerik:radstylesheetmanager>

Can stylesheets be added from code behind?

Regards DotnetShadow

1 Answer, 1 is accepted

Sort by
0
Rob
Top achievements
Rank 1
answered on 28 Jan 2014, 11:52 AM
edit: Found issue, it was a casing issue, had uppercase letters in the filename
Tags
ScriptManager and StyleSheetManager
Asked by
Rob
Top achievements
Rank 1
Answers by
Rob
Top achievements
Rank 1
Share this question
or