View Single Post
  #1 (permalink)  
Old December 19th, 2006, 07:57 AM
inimay inimay is offline
Registered User
 
Join Date: Dec 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Timer elapse event in asp.net

Hi,

I have written timer elapsed event in asp.net.But it is not firing.
I have given the following code in pageload
private static System.Timers.Timer t = new System.Timers.Timer();
t.Interval = 20000
t.Enabled = true;
t.Elapsed += new ElapsedEventHandler(t_ElapsedEventHandler);

then this is my event

private static void t_ElapsedEventHandler(object sender,ElapsedEventArgs e)
{

Label1.text="XXX";

}

but this event is not firing...Please help

Reply With Quote