Furqan Misarwala
Furqan Misarwala

Reputation: 1891

Countdown in ASP.NET

I need to give the countdown as shown here, for each item using ASP.NET with C#.

Any ideas on how to solve this problem?

Upvotes: 1

Views: 721

Answers (4)

Johan
Johan

Reputation: 26

You need a webservice that can give the state (time left, current price, #bids etc) of all the items visible on the page back to the client.

The client uses typically AJAX / JSON to retrieve the state of all the items on the page and then jquery to update the countdown timers/bids on each item on the page.

Upvotes: 0

Dustin Laine
Dustin Laine

Reputation: 38503

That site is using AJAX, as you can see from the regular refreshes that occur to the individual timers. You can create a web service or web method to consume. If the times don't need to be refreshed during the life of the page, then I would stick with a simple JavaScript countdown using jQuery or the link the @kieran shared.

Upvotes: 0

rahul
rahul

Reputation: 187020

You can use setInterval method to implement a count down timer.

You can get the initial time from the server. And then use javascript to get the count down timer working.

Upvotes: 4

Kieran
Kieran

Reputation: 18049

To do this you could use ajax. http://www.asp.net/ajax/

Specifically you could use this control http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/AlwaysVisibleControl/AlwaysVisibleControl.aspx

Upvotes: 1

Related Questions