Will Web 3.0 Replace Web 2.0?
Become a member
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
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">
</asp:Timer>
And, in C# back-end code :
int counter = 60;
protected void Timer1_Tick(object sender, EventArgs e)
{
if(counter!=0)
{
counter--;
timer.Text = "00:" + counter.ToString();
}
}
Reply
Answers (
6
)
How to read or view PDF file in windows form
Build a Calculator using Array