Load stylesheet after stylesheetmanager

2 posts, 0 answers
  1. Giovanni De Lazzari
    Giovanni De Lazzari avatar
    16 posts
    Member since:
    Sep 2006

    Posted 16 Oct 2012 Link to this post

    HI
    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")
                    Page.Header.Controls.Add(link)
                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>
     
    </title></head>

    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 ?
    thanks




  2. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 18 Oct 2012 Link to this post

    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,
    Kate
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top