Abhishek Kumar Ravi

Abhishek Kumar Ravi

  • 210
  • 11.5k
  • 4.2m

ASP.NET: How can i add a Timer Control for 60seconds

Aug 4 2014 6:47 AM
What i Want:  I have a page, where i want TIMER type control on the top which ticks for 60 seconds and, then it Redirect to new page after the completion.
 Till now, i have :
In .ASPX page,
<asp:Label ID="timer" runat="server" Font-Bold="True" Font-Names="Segoe UI" Font-Size="50px" ForeColor="Gray" Text="00:60"></asp:Label>
<asp:Timer ID="Timer1" runat="server" OnTick="Timer1_Tick" Interval="5000">
And, in C# back-end code :
int counter = 60; 
protected void Timer1_Tick(object sender, EventArgs e)

timer.Text = "00:" + counter.ToString();

Answers (6)