1

I am stuck with count down in ajax, I have a small website where I ask each user 5 question in 1 min time, after they login using asp.net membership provider. I want when the user time is over he/she must be taken to result page and show the result, I am using asp.net ajax timer, but if the user press F5 his time start again and by pressing F5 he can continue his test.

how can I stop that. also is there a easy way to show countdown using Ajax for 60sec

Regards Arshad

1
  • This is more JavaScript related than AJAX. JavaScript is what you need for the timer to work, and a simple script sent by the server on page request will suffice for the timer to resume where it stoped earlier, no AJAX at all, just some JavaScript. JS is not AJAX, and generics have nothing to do with reflection. </rant> Commented Feb 7, 2011 at 22:19

1 Answer 1

2

Anything client side is potentially hackable, so you can't effectively maintain a time limit using only client-side technologies. When they begin a test, keep a DateTime in their Session to indicate that a test has been begun. If the submission comes in after more than the time limit has elapsed based on the server time, then tell them to try again cause they cheated.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.