How can I set up a voting system in my ASP.NET webpage?
-=First things first, let's establish that I know some ASP.NET, but not all (Same with C#=-
This is more of a C# question that ASP.NET, but I was wondering how I could implement a voting system that would allow my to do one of two things (These are just the strategies I've come up with so far, I'm open to anything):
1) Have an object with the parameter "name" and "votes", that allows you to have an object, say "Person1" that you could vote for.
2) Have an array/dictionary (that thing that holds a value, like a word, and a linked string, like a definition. I forget what it's called) that holds the persons name, and the correlated votes.
If it were just figuring out how to use one of those, this would be easier. But my main question is, How can I organize them, in a webpage, by the amount of votes they have? The simplest solution I can think of would be to use a while/foreach to compare every single value to every single other one, and there has to be a better way to accomplish this than that.
|