Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Disable Label after some amount of time

0.00/5 (No votes)
8 Feb 2012 1  
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.
C#
lbl.Text = "Assign Text";
upnl.Update();


Fadeout method:
C#
function BannerOut() {
    $(".fadeLabel").fadeOut(1000);
}


Thanks
--RA

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here