Timers in Online Exams

Mar 1 2007 12:44 PM
Wed, 28 Feb 2007 09:52:12 -0800

 

we are creating  Online Exams Module.Just lke any other online exams on other real sites.

The Case is the user can attempt any question within 3 minutes.after 3 minutes,the next question automatically disappears and another question comes on the page.

We also want to show times in Minutes as a clock just like any other online exams.

My issue is that how can i show time on each page and how can i calculate every  3 minutes.

I know there is Timer/Thread class in c# for web application.But i dont know how they can efiicently work.
Or there is any other better method to do it.
Even i have tried to it with timers in Asp.net 2005 .


and My code was this:-






System.Timers.Timer time1=new timer();
time1.AutoReset=true;
time1.Interval=60000;
time1.Elapsed+=new ElapsedEventHandler(time1_Elapsed);
and event was such

private void time1_Elapsed(object source,System.Timers.ElapsedEventArgs e)
{////////////Any function




}
But this code is not properly working..and i seem my application does not show
any result or seems AMBIGIOUS. Plaese help me with example or code.

Or write some better way.

I am not very perfect at it.
By:-archana