I would do it the way you say, but in the database I use the relational database functions more.
For example, the presence of a user table with a one-to-many relationship to the question table. If you want them (users) to be able to ask questions, you need a table with each user question, this is another one-to-many relationship. Then you also need a vote table that has a one-to-many relationship with a question table and a user table, so you can keep track of which user voted on the question and what question he had.
The main thing is that if you use the relational database system correctly, it will simplify your life to keep track of things in the background and therefore you will give the user the best experience.
That is one thing. Then make your voting images clickable, so use the onclick event, with jQuery, which should be pretty simple.
Use AJAX to perform postback when you click on an image, so you donโt need to post all over the page every time a user votes. It will also enhance the user interface. Lots of tutorials on AJAX with ASP.NET.
Hope this helps!
source share