Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

My requirement is to display label on button click and fade out the label text after 10 sec. This can be done with javascript but i want to implement this requirement through Ajax.

Can anyone provide any good link or any suggestion on how to implement this.

Thanks
Posted
Comments
E.F. Nijboer 29-Jul-10 3:32am    
What is your own idea on doing ajax without javascript? After 10 seconds your plan is to bother the server every xx milliseconds requesting a new color? Or must give you a complete label element including all elements inside that? There is no valid reason to implement it this way. Are you asking for learning purposes? or are you really planning to implement it this way?
koool.kabeer 29-Jul-10 5:20am    
make your own AjaxControlExtender....

Check this JQuery FadeOut[^]
 
Share this answer
 
Hi all,

Solved it by myself using UpdatePanelAnimationExtender.

Just wanted to share if others are looking for same.

Below is the code that is self explanatory.

<pre lang="xml"><asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                                                <ContentTemplate>
                                                    <asp:Label ID="lbl_msg" runat="server" ForeColor="Red" Visible="False"></asp:Label>
                                                </ContentTemplate>
                                                <Triggers>
                                                    <asp:AsyncPostBackTrigger ControlID="btn_save" EventName="Click" />
                                                </Triggers>
                                            </asp:UpdatePanel>


<pre lang="xml"><asp:UpdatePanelAnimationExtender ID="UpdatePanelAnimationExtender1" runat="server"
                                                TargetControlID="UpdatePanel1">
                                                <Animations>
                                                        <OnUpdated>
                                                        <FadeOut Duration="5.0" Fps="24" />
                                                        </OnUpdated>
                                                </Animations>
                                            </asp:UpdatePanelAnimationExtender>


The above fades lbl_msg in 5 sec.

Thanks
 
Share this answer
 
Comments
Mustafa_9664 8-Nov-12 4:18am    
How do i make a label fade which is displaying an empty textbox validation and i want it to fade out when start writing in a textbox.... please any help...
can u plzz rep me for the same in vb.net..please...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900