---
title: "Ajax Toolkit Timer Control in ASP.Net"  
description: "Timer controls allow you to do postbacks at certain intervals. The main properties of timer control is Interval and default event of timer is Tick ()"  
author: "John Smith"  
published: 2010-12-04  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/284/ajax-toolkit-timer-control-in-asp-dot-net  
category: "ajax"  
tags: ["ajax"]  
reading_time: 1 minute  

---

# Ajax Toolkit Timer Control in ASP.Net

Timer [controls](https://www.mindstick.com/articles/66/how-to-create-controls-at-run-time-in-csharp-dot-net) allow you to do postbacks at certain intervals. The main [properties](https://yourviews.mindstick.com/view/81845/now-it-s-possible-to-predict-properties-of-any-molecule) of [timer control](https://www.mindstick.com/articles/321/timer-control-in-vb-dot-net) is **Interval** and [default](https://www.mindstick.com/interview/12771/what-is-the-importance-of-default-resources) [event](https://www.mindstick.com/articles/167719/marquee-hire-benefits-of-event-lighting-hire-london) of timer is Tick ()\

## Syntax:

## \

```
<asp:Timer ID="Timer1" runat="server"></asp:Timer>
```

## Code:

**Write these codes on [aspx page](https://www.mindstick.com/forum/218/how-do-i-create-an-aspx-page-that-periodically-refreshes-itself)**

```
 <%-- ScriptManager control manages client script for AJAX enabled ASP.NET pages--%><asp:ScriptManager ID="ScriptManager1" runat="server" /><asp:Timer ID="UpdateTimer" runat="server" Interval="3000" OnTick="UpdateTimer_Tick" /> <%--OnTick Method Raises the Tick event.--%><asp:Label ID="Label1" runat="server" />
```

Write these code on timer event

```
protected void UpdateTimer_Tick(object sender, EventArgs e){  Label1.Text = DateTime.Now.ToString();}
```

Interval [property](https://www.mindstick.com/articles/198559/an-ownership-of-property-in-hua-hin) is set in milisecond.

**Run the [Project](https://yourviews.mindstick.com/story/1788/things-to-ensure-your-construction-project-is-successful)**

![AjaxControl Toolkit Timer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/2bd1d5f5-3c79-4ba3-a3fc-0b58f3a262a8/images/e2fac8db-bb38-4321-b0a4-a526608d57fd.png)

Page will automatically refresh after 3 second. We can change refresh time using timer control property Interval.

---

Original Source: https://www.mindstick.com/articles/284/ajax-toolkit-timer-control-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
