update stylesheets within head-tag

4 posts, 0 answers
  1. Bernhard Rosenfelder
    Bernhard Rosenfelder avatar
    24 posts
    Member since:
    Mar 2010

    Posted 19 Jul 2011 Link to this post

    hi community,

    does anybody know how to update stylesheets within head-tag per ajax?

    thank you for your help
    bernhard
  2. Kiara
    Kiara avatar
    309 posts
    Member since:
    Jul 2006

    Posted 19 Jul 2011 Link to this post

    Are you looking for page head updates during ajax requests? If yes, try to use the EnablePageHeadUpdate property of the telerik ajax manager or panel. In case you want to register the skins of the controls after async request, set their EnableAjaxSkinRendering property as in this example:
    http://demos.telerik.com/aspnet-ajax/ajax/examples/common/showingwebcontrols/defaultcs.aspx

    Hope my guidelines are helpful.

    Kiara
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Bernhard Rosenfelder
    Bernhard Rosenfelder avatar
    24 posts
    Member since:
    Mar 2010

    Posted 19 Jul 2011 Link to this post

    hi kiara,

    i tried to use the EnablePageHeadUpdate property but the RadAjaxManager didn't update the style tag within the head.
    <head runat="server" id="head1">
        <title></title>
        <style runat="server" id="stylepanel1" type="text/css" customvisibility="0">
                .panel1 { visibility: hidden; display: none; }
        </style>
    </head>

    Protected Sub RadButton1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles RadButton1.Click
            Dim Style As HtmlGenericControl = Header.FindControl("stylepanel1")
            Style.InnerText = ".panel1 { visibility: hidden; }"
        End Sub

    is here something wrong?

    regards,
    bernhard
  5. Kiara
    Kiara avatar
    309 posts
    Member since:
    Jul 2006

    Posted 20 Jul 2011 Link to this post

    I see what you mean now. I doubt what you want is attainable because as far as I know the ajax manager/panel cannot update elements outside of the body tag.  I stand corrected though, especially if you can manage to that with MS UpdatePanels.

    Kiara
Back to Top