Voting Program

post_id: 43 / post_date: 2011-06-04



[tab: Intro]

For counting votes (admin only), this simple program (written in 45 minutes) shows a set of buttons for each candidate and you can click on the button to increase his votes.

Candidates.txt is the input and also where the count is stored.
Once counting is over (or anytime), simply open the Count tab to see the results.

Count has 3 buttons. Clear to reset all counts to 0, Names to open the text file for editing, Reload when changes are made manually.

See code overleaf or browse or download.

Approach:

[tab:Candidate]

[iframe src="http://cselian.com/d/code/serve.php?file=./pp/5/Candidate.cs"]

[tab:Form]

[iframe src="http://cselian.com/d/code/serve.php?file=./pp/5/VoteForm.cs"]

[tab:ss: voting]

[tab:ss: count]