General Knowledge Basic General Knowledge Subjective
Apr 03, 2013

Explain the need of the Timer control in AJAX.

Detailed Explanation

The Timer control is used with an UpdatePanel control to allow partial-page updates at a specified interval. It is mostly used when a periodically partial-page update for one or more UpdatePanel controls is required without refreshing the entire page.

The Timer control is a server control that sets a JavaScript component in the Web page. The interval property of the Timer control specifies time in milliseconds. Similar to the UpdatePanel control, the Timer control also requires an instance of the ScriptManager control in the Web page.

When the Timer control initiates a postback, the Tick event is raised on the server for which you can provide an event handler to perform the actions when the page is submitted to the server. The Tick event occurs when the time specified in the interval property has elapsed and the page is posted on the server. You can add one or more Timer controls on a Web page. Usually the entire page requires only a single Timer control; however, you can use multiple Timer controls, if the UpdatePanel controls are being updated at different intervals.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback