Solved

asp .net timer without reset

Posted on 2011-03-19
2
455 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
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
daypilot scheduler 3 30
Media.Imaging 1 18
Problem!!! 8 33
RegEx with optional part 4 24
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

803 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