This documentation is archived and is not being maintained.

Timer.Tick Event

Occurs when the number of milliseconds specified in the Interval property has elapsed and the page is posted to the server.

Namespace:  System.Web.UI
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

member Tick : IEvent<EventHandler<EventArgs>,
    EventArgs>

<asp:Timer OnTick="EventHandler" />

The Tick event is raised when the number of milliseconds specified in the Interval property has elapsed either since the Web page was last rendered or since the previous Tick event. Handle the Tick event when you have to perform actions during each postback.

The following example shows an UpdatePanel control that displays a randomly generated stock price and the time that the stock price was generated. The Timer control updates the content in the UpdatePanel control every 10 seconds. The stock price and the time are set in a handler for the Tick event.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: