For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET Webcontrols > April 2005 > how to calculate time









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author how to calculate time
yoshitha

2005-04-19, 4:02 pm

hi ,
am developing quiz application.

the questions will be displayed one at a time after clicking next button
only the next question will be displayed.

for evry test the time to finish this test will be maintained in back end.

so i set 75 minutes for a particulat test. after 75 minutes whether the

candidates completed all the question or not but the test must be closed.

can anybody tell me how to do this one.

thanx in advance
yoshitha


Ken Cox [Microsoft MVP]

2005-04-19, 8:58 pm

Get the starting time in ticks and add to it however many ticks there are in
75 minutes. Store the result in a Session variable.

Whenever the Next button is clicked, get the number of ticks from the
current time Now(). Test that it is less than the value you stored in the
Session variable. If less, let the user keep going. If not, end the test.

http://msdn.microsoft.com/library/d...stickstopic.asp


"yoshitha" <jyothirmai@nannacomputers.com> wrote in message
news:eDpmyfORFHA.3096@TK2MSFTNGP12.phx.gbl...
> hi ,
> am developing quiz application.
>
> the questions will be displayed one at a time after clicking next button
> only the next question will be displayed.
>
> for evry test the time to finish this test will be maintained in back end.
>
> so i set 75 minutes for a particulat test. after 75 minutes whether the
>
> candidates completed all the question or not but the test must be closed.
>
> can anybody tell me how to do this one.
>
> thanx in advance
> yoshitha
>
>


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com