I’m in the middle of writing a blog site in asp.net (VB) and am trying to add thumbs up / down voting buttons to each article in an asp.net repeater control. The site is driven from an SQL database and im looking for the best way to achieve this? Im hoping to end result will have a similar look and feel to reddit, stackoverflow & youtube voting.
I’m using SQL membership for security and will request that the user logs in before they can vote. I know I will need to store the following values (article ID, user id, vote value) so the total can be updated and stop any duplicate voting.
I’ve created 3 tables (Articles, Votes, Users). The votes table will record each vote storing the (article id, userid, vote value). I have also added a ‘vote total’ field to the articles table which will be updated via a stored procedure each time a vote is made. This should help performance when showing the articles.
What I cant work out is the best way to implement the buttons against each article?
I would be extremely grateful for any advise, Thanks