Posts

Showing posts from October, 2011

Count down timer in asp.net

We can display the count down by using timer control or by using the java script. Timer control will repeatedly call the post back on every tick, which will decrease the performance of the site. It’s better to use the java script. Following is the code for implementing the Count Down:- Test.aspx: < asp : Label ID ="lblTimer" runat ="server"></ asp : Label > Write this line in body, if it is simple one page site. If you have master page the write above code in the asp : Content. Script:- On the same page write following script:- This script will update the time and on label and calculate the time in Hours, Minutes, and Seconds. < script type ="text/javascript" language ="javascript">       var timeout = "<%= Session.Timeout * 60 * 1000 %>" ;       var lbltimer = document.getElementById( "<%= lblTimer.ClientID %>" );       debugger...