Hi i am sankar.I am using dotnet 2005 .and then i want refresh a method only using timer control,but i have used timer control in my application,but it's didn't work properly.So please tell me how to use timer control in asp.net 2.0?
Thanks and Regards,
Sankar
Loading

Anuja PawarRank #1,404 · 1.2K reputationPosted Nov 29, 2011, 10:12 PM EST
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
We only have a single CodeBehind function, which you should add to your CodeBehind file:
protected void UpdateTimer_Tick(object sender, EventArgs e)
{
DateStampLabel.Text = DateTime.Now.ToString();
}
sankar28 reputationPosted Nov 29, 2011, 11:08 PM EST
I have used this coding,but didn't refresh a timer.
My coding below
Code behind:
protected void Timer1_Tick(object sender, EventArgs e)
{
date.Text = DateTime.Now.ToString();
}
protected void Page_Load(object sender, EventArgs e)
{
date.Text = DateTime.Now.ToString();
}
Anuja PawarRank #1,404 · 1.2K reputationPosted Nov 29, 2011, 11:22 PM EST
It should work
Pls refer this two links, hope it helps :)
http://msdn.microsoft.com/en-us/library/bb386404.aspx
http://www.devmanuals.com/tutorials/ms/aspdotnet/timer.html
Satyapriya NayakRank #47 · 31.5K reputationPosted Nov 29, 2011, 11:37 PM EST
Please refer the below link
http://www.dotnetfunda.com/tutorials/ajax/timer.aspx
Thanks
sankar28 reputationPosted Nov 29, 2011, 11:41 PM EST
This is displaying only Time,but didn't refresh the time in asp.net 2.0.But this coding properly working in asp.net 3.5.What i do timer control run in asp.net 2.0?
sankar28 reputationPosted Nov 30, 2011, 12:25 AM EST
Now that's working fine.I found that problem.
Thanks lot
Anuja PawarRank #1,404 · 1.2K reputationPosted Nov 30, 2011, 12:28 AM EST
sankar28 reputationPosted Nov 30, 2011, 6:25 PM EST
Thanks for your post.
Anuja PawarRank #1,404 · 1.2K reputationPosted Nov 30, 2011, 7:56 PM EST