1

Wondering if anyone has an idea of how I could make a digg style ajax voting buttong with ASP.NET AJAX.

Thanks

2
  • be nice and call it a "stackoverflow"-style ajax voting button ;-)
    – Thilo
    May 3, 2009 at 2:05
  • :) Thanks 1800 INFORMATION thats exactly what I was looking for.
    – bExplosion
    May 3, 2009 at 11:19

1 Answer 1

4

It is quite difficult to answer your question without knowing your level of knowledge. In order to implement this kind of thing, you need a few general components:

  1. you need a "web-service" that implements the concept of a "vote" - you implement this web-service using a framework such as ASP.Net MVC, ASP.Net with WebForms or some other method. When the web service is called, it will increment or decrement the vote count
  2. You use a client side AJAX library such as JQuery, or use the built in support for web-service client code in ASP.Net - this code runs in the browser - you need to hook up this code so that when the user selects a vote button in your UI, the client side code calls your web service to increment or decrement the vote.

That's pretty much it in general terms. The writing of this kind of thing isn't too tricky, you have to kind know where all the parts are and how to keep all the balls in the air and it should fall into place.

2
  • Do we really to create a web service. Cant it not just be a button, once clicked send a ajax request to update the database entry?
    – Thang Pham
    Oct 4, 2010 at 18:09
  • You can use controller method in asp.net mvc. You can find options with webforms also, but, probably webservice is the best way on webforms. Dec 6, 2010 at 18:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.