Test questions application

  • Thread starter Thread starter Sehboo
  • Start date Start date
S

Sehboo

Hi,

I need to build an application which will test students for a given
amount of time. Problem is that there is no timer control in asp.net,
because timer should be on the client side.

Everything works in the app, except that I don't know how to expire the
page when time is up.

Any pointers?

Thanks
 
you could always have some javascript in the client autosubmit to the server
after a given time, and show them a countdown. You could match that to a
session time value to ensure no cheating occured.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director
 
There are multiple ways to keep a server timer ..

The simplest would be to keep a hidden IFRAME, create an aspx page say
CheckTimeExpire.aspx and open it in this hidden iframe.. evey minute or so
refresh the content of iframe. The CheckTimeExpire.aspx will check a session
variable for time expiry. .... Once the time expired use javascript to
display message/disable questions etc ..

Another solution is to use AJAX, ATLAS... you will be able to find some
samples if you google..

Came across another article that may help for this in a more efficient way..

http://ajax.schwarz-interactive.de/csharpsample/default.aspx

Checkout 'Is it possible to wait for events?'

How it works is "There is no timer at the client's javascript. In 10
seconds the request will response and call the client callback function"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top