Description:
The AJAX Timer control enables a portion of an ASP.NET web page to be dynamically updated at a regular interval, rather than needing the user to perform an action such as clicking on a button.
Timer control performs a postback at a specified time; on postback the Timer's Tick event is raised. If the Timer control is placed within an UpdatePanel it triggers a partial page postback, during which we can rebind other controls to update their display[1];
Notes:
The Timer control has three client-side methods that we can use to achieve this desired functionality[1]:
_startTimer()- starts the Timer control_raiseTick()- causes the Timer control to "tick," thereby posting back and raising its Tick event on the server_stopTimer()- stops the Timer control
Related articles:
[1] - Master Pages and ASP.NET AJAX: the Timer control is used to refresh other controls on the page. It also explains how to interact with the Timer control from client-side script (JavaScript);
[2] - Timer control : a small example of using the Timer control. It simply updates a timestamp every 5 seconds;
[3] - How Do I: Use the ASP.NET AJAX Timer Control?: video tutorial;
No comments:
Post a Comment