how can i create a countdown timer using C# ?
-
Hi guys, Im about to start development on a countdown timer that will display the time left for a particular product. the format will be like this - 00:00:11. I have been watching the AJAX video tutorials so im thinking of approaching this by setting an updatePannel with a timer with a tick event every 1000ms. Inside the updatePannel i could have a label that is attached to a C# method that contains the countdown logic 2 questions... 1: is this a good way forward or not. 2: can anyone suggest data time classes/methods that i will find useful so for example an admin can enter a start date and an end date and the timer will show the days, hours, minutes and seconds remaining. the site im trying to emulate is this http://www.telebid.com/ looks like they have AJAX countdown timers too. thank you for your help Truegilly
-
Hi guys, Im about to start development on a countdown timer that will display the time left for a particular product. the format will be like this - 00:00:11. I have been watching the AJAX video tutorials so im thinking of approaching this by setting an updatePannel with a timer with a tick event every 1000ms. Inside the updatePannel i could have a label that is attached to a C# method that contains the countdown logic 2 questions... 1: is this a good way forward or not. 2: can anyone suggest data time classes/methods that i will find useful so for example an admin can enter a start date and an end date and the timer will show the days, hours, minutes and seconds remaining. the site im trying to emulate is this http://www.telebid.com/ looks like they have AJAX countdown timers too. thank you for your help Truegilly
-
Hi guys, Im about to start development on a countdown timer that will display the time left for a particular product. the format will be like this - 00:00:11. I have been watching the AJAX video tutorials so im thinking of approaching this by setting an updatePannel with a timer with a tick event every 1000ms. Inside the updatePannel i could have a label that is attached to a C# method that contains the countdown logic 2 questions... 1: is this a good way forward or not. 2: can anyone suggest data time classes/methods that i will find useful so for example an admin can enter a start date and an end date and the timer will show the days, hours, minutes and seconds remaining. the site im trying to emulate is this http://www.telebid.com/ looks like they have AJAX countdown timers too. thank you for your help Truegilly
Can't you use pure javascript for this? That will be lot better I think. If you want to use C# for this, the TimeSpan class and it's properties will be useful.
Nirandas, a developer from India. http://www.nirandas.com