Skip to content Skip to sidebar Skip to footer

Css Style Stops Working On Partial Postback

in a ASP.net C# application I have a Checkbox with a custom css. the Css file is: the check box

Solution 1:

I had similar problem. I solved it moving css <link .. from the <page> to the <header>.

Since I use a MasterPage and I don't want the link in all pages, I found useful putting a ContentPlaceHolder in the MasterPage's Header

<headid="Head1" runat="server">
  ...
  <asp:ContentPlaceHolder ID="HeaderContentPlaceHolder" runat="server"/>
</head>

and then the link inside the desired page:

<asp:Content ID="Content2" ContentPlaceHolderID="HeaderContentPlaceHolder"       Runat="Server">
    <link rel="stylesheet"type="text/css" href="CSS/my.css" />
</asp:Content> 

Post a Comment for "Css Style Stops Working On Partial Postback"