Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

asp .net timer without reset

Posted on 2011-03-19
2
Medium Priority
?
475 Views
Last Modified: 2012-05-11
Hi-

I have a page the opens a new window (popup) to an aspx page. On the page is a test the user completes. The test is timed. I am looking for the best way to hold the time so if the user refreshes the page or navigates away from it and then comes back the timer continues to run. But, if the user closes the popup then the timer will stop.

Any help would be appreciated.
0
Comment
Question by:doctor069
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 35174182
I would think you'd keep the time the test was started in a Session parameter. On refreshes, you can calculate the difference between the new request's time and the original start time and use this as an initializer for the time displayed to your user, which would be updated via javascript once it's rendered on the client.

For the popup, you would probably want to handle the onunload event to send a request back to the server to clear the timer (i.e. remove start time from the session).
0
 

Author Closing Comment

by:doctor069
ID: 35209066
Think that is the best way.

Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question