Live clock and "time left" on asp.net page

I have a asp.net page which has a date/time stored in the database. Let's say "Table1.MyDateTime", which is stored in a label called "labelMyDateTime".

How can I...
(1) Display the LIVE SERVER TIME and have it update with each second AND
(2) Display the LIVE TIME UNTIL Table1.MyDateTime/labelMyDateTime (example: "3 days, 2 hours, 15 minutes left")

Again, both needs to update each second.

Please provide sample code.

Thanks!
LVL 9
RobertNZanaAsked:
Who is Participating?
 
xav056Connect With a Mentor Commented:
Date.Now would actually get you the server time to refresh every second you will have to use an update panel
check those two links out
http://ajax.net-tutorials.com/controls/timer-control/
http://www.asp.net/ajax/videos/how-do-i-get-started-with-aspnet-ajax
0
 
RobertNZanaAuthor Commented:
The problem is that I'm using a modelpopupextender on the page and when they invoke the popup on the "tick" the popup disappears. So, that's the obstacle at the moment. Any other ideas?
0
 
xav056Commented:
look at conditionally updating the update panel
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
xav056Commented:
another idea
if the date is not in the pop up extender, disable the time untill the popup extender is dimissed
0
 
RobertNZanaAuthor Commented:
can u provide code for this?
0
 
xav056Commented:
just put your popup extender code in a different update panel and set the update mode on both to conditional
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.