Search code examples
c#asp.nettimercountdown

Timer countdown sql, asp.net c#


i have table with the desgin:

==========

id  (int, key)
itemName (nvarchar max)
offerClosing (datetime)

at the offerclosing i'm enter the date and time of the end of the offer to the item... example, now we at 16/5/2011 15:20 and the sale will end at 16:20, i want that at some lable will be timer countdown that will countdown one hour untill we get 16:20.

hope that's clearly and that possible.


Solution

  • I'm assuming the countdown is displaying in a web browser. You'll want to write the countdown in javascript. Basically, store the offerClosing in a javascript variable and then use setTimeout with an interval of 1000ms (1s) to update the display of time remaining.