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

Load stylesheet after stylesheetmanager

1 Answer 148 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Giovanni De Lazzari
Top achievements
Rank 1
Giovanni De Lazzari asked on 16 Oct 2012, 11:21 AM
I use stylesheetmanager to load my styles 
but now I need to change the logo for my server side events
so I put this on pageload
If Not Session("folderStyle") = Nothing Then
               Dim link As New HtmlLink()
                link.Href = Session("folderStyle")
                link.Attributes.Add("rel", "stylesheet")
                link.Attributes.Add("type", "text/css")
            End If

So when I load the new styel I overwrite the definitions in the common stylessheetmanager references
the problem is that Stylesheetmanager load the styles at the last row of html before </head>tag
so the result is 
<link href="/css/ProdottiManzi/English/stile.css" rel="stylesheet" type="text/css" />
<link href="/Telerik.Web.UI.WebResource.axd?compress=1&_TSM_CombinedScripts_=%3b%3b%7c634859195287498065%3a94dbb91c%3a58260d52%3a267fe04e%3bTelerik.Web.UI%2c+Version%3d2012.2.912.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3ait-IT%3a6aabe639-e731-432d-8e00-1a2e36f6eee0%3aed2942d4%3a53e1db5a%3ad126a8ef%3a92753c09%3a91f742eb%3a4f5793d0%3afe53831e%3bTelerik.Web.UI.Skins%2c+Version%3d2012.2.912.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3ait-IT%3ab0377b55-749e-4497-8000-b9ed5bce0744%3a6856648a%3af7a27b73%3a261be263" type="text/css" rel="stylesheet" /><title>

and as you can see my definition is before and not after
telerik sheets and mine used in stylesheetmanager

is there some property to change or my I add a style reference at runtime ?

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 18 Oct 2012, 04:24 PM
Hello Giovanni,

Please take a look at the following forum post as I believe it would be very useful for your scenario. Give it a try and let me know if it helps - custom CSS after telerik CSS in HEAD section

All the best,
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
ScriptManager and StyleSheetManager
Asked by
Giovanni De Lazzari
Top achievements
Rank 1
Answers by
Telerik team
Share this question