Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0 jQuery
How to make a label disappear after a certain length of time?Using c# or Jquery.
Posted 10-Jul-13 11:34am
Comments
ThePhantomUpvoter at 10-Jul-13 16:37pm
   
Using some form of a timer?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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/[^] Smile | :) .
 
—SA
  Permalink  
Comments
Espen Harlinn at 10-Jul-13 16:47pm
   
Nice links - 5'ed! :-D
Sergey Alexandrovich Kryukov at 10-Jul-13 16:47pm
   
Thank you, Espen.
—SA
prasy123 at 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 at 11-Jul-13 13:54pm
   
Great; you are very welcome.
Good luck, call again.
—SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

I figured out one solution :
 
In Code Behind:
 
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:
<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>
  Permalink  
v2

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

  Print Answers RSS
0 OriginalGriff 341
1 Marcin Kozub 225
2 Sergey Alexandrovich Kryukov 220
3 Praneet Nadkar 197
4 Shweta N Mishra 161
0 OriginalGriff 8,149
1 Sergey Alexandrovich Kryukov 7,287
2 DamithSL 5,614
3 Manas Bhardwaj 4,986
4 Maciej Los 4,910


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 11 Jul 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100