Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to make a label disappear after a certain length of time?Using c# or Jquery.
Posted
Comments
[no name] 10-Jul-13 16:37pm    
Using some form of a timer?

This can be conveniently done by a combination of jQuery .hide() and .delay():
http://api.jquery.com/hide/[^],
http://api.jquery.com/delay/[^].

See also, just in case: http://api.jquery.com/show/[^] :-).

—SA
 
Share this answer
 
Comments
Espen Harlinn 10-Jul-13 16:47pm    
Nice links - 5'ed! :-D
Sergey Alexandrovich Kryukov 10-Jul-13 16:47pm    
Thank you, Espen.
—SA
prasy123 11-Jul-13 12:24pm    
Hi SA ,

The Jquery links which you provided gave me some idea to figured out a solution for my question.

Thanks.
Sergey Alexandrovich Kryukov 11-Jul-13 13:54pm    
Great; you are very welcome.
Good luck, call again.
—SA
I figured out one solution :

In Code Behind:

VB
Protected Sub Gridview1_RowDeleting(sender As Object, e As GridViewDeleteEventArgs)
        lbldeletemsg.Visible = True
        lbldeletemsg.Text = "DATA DELETED •"
        lbldeletemsg.Focus()
        ScriptManager.RegisterStartupScript(Me.Page, Me.[GetType](), "KeyToIdentifyfadeoutScript", "Fadeout();", True)
    End Sub



In aspx page:
C#
<script type="text/javascript" src="scripts/jquery-1.4.1.min.js">
function Fadeout() {
    $("span[id$='lbldeletemsg']").fadeOut(5000);

}

OR

function Fadeout() {
    $("span[id$='lbldeletemsg']").fadeOut("slow");

}

</script>
 
Share this answer
 
v2

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