Walkthrough: Introduction to the Timer Control

In this walkthrough you will update part of a Web page at a timed interval by using three ASP.NET AJAX server controls: the ScriptManager control, the UpdatePanel control, and the Timer control. Adding these controls to a page eliminates the need to refresh the whole page with each postback. Only the contents of the UpdatePanel control will be updated.

For more information about partial-page rendering, see Partial-Page Rendering Overview.


To implement the procedures in this walkthrough you need:

  • Microsoft Visual Studio 2005 or Visual Web Developer Express.

  • An AJAX-enabled ASP.NET Web site.

To refresh an UpdatePanel control at a timed interval


This walkthrough introduced the basic concepts of using a Timer control and an UpdatePanel control to enable partial-page updates. You must add a ScriptManager control to any page that contains an UpdatePanel control or Timer control. By default, a Timer control inside the panel will cause just the panel to refresh during an asynchronous postback. A Timer control outside a panel can cause the UpdatePanel to be refreshed if it is configured as a trigger for the panel.

The next step is to learn about how to use the Timer control outside an UpdatePanel control and about how to use the timer to update more than one UpdatePanel control. For information about these tasks, see Walkthrough: Using the ASP.NET Timer Control with Multiple UpdatePanel Controls.

See Also


Timer Control Overview

Partial-Page Rendering Overview