Disable Label after some amount of time





5.00/5 (2 votes)
Achieve the same using AJAX AnimationExtender control. Use the below code: ...
Achieve the same using AJAX
AnimationExtender
control.
Use the below code:
<asp:updatepanel id="upnl" runat="server" xmlns:asp="#unknown"> <contenttemplate> <asp:label id="lbl" runat="server" cssclass="fadeLabel"></asp:label> </contenttemplate> </asp:updatepanel> <asp:updatepanelanimationextender id="upax" runat="server" behaviorid="animation" targetcontrolid="upnl" xmlns:asp="#unknown"> <animations> <onupdated> <sequence> <ScriptAction Script="fadeOut()" /> </sequence> </onupdated> </animations> </asp:updatepanelanimationextender>in your code behind.
lbl.Text = "Assign Text";
upnl.Update();
Fadeout method:
function BannerOut() {
$(".fadeLabel").fadeOut(1000);
}
Thanks
--RA