Page

Refresh update panel content with new css styles



<style>
NewCSS
{
color: #00cc00;
font-weight: 700;
}
</style>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> </ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnReload" EventName="Click" /> </Triggers>
</asp:UpdatePanel>
<asp:Button ID="btnReload" runat="server" onclick="btnReload_Click" Text="Refresh Update Panel" />

// Default.aspx.cs //


protected void btnReload_Click(object sender, EventArgs e)
   
{
       
Label1.CssClass="NewCss";
    }


No comments:

Post a Comment