Today we move over to the web side of things. I put this together with VS 2010, and it’s a single aspx page with a single class and a user control. I’m using DevExpress controls (they provide me with a free subscription, good stuff).
Here’s the normal view that a voter will see if they’ve clicked a link received in email. That link would be passing in the BallotID and the VoterID. We do a check to see if the election is open, and that they haven’t already voted and if all is well, they can vote. As you can see I’m not a UI wizard! The nice part is this stuff is easy to change, it’s the plumbing that takes time to figure out.
Here is the post vote display (same page):
If they try to refresh to vote again they get this:
If all they have is the ballot ID (from a link we share on Twitter for example), they get a different display (same page). Because we’re going to send a email to the address they enter, I added the captcha to reduce the chances of a bot hitting it and getting us blacklisted. If the address is valid for that election we send them a full URL, otherwise they get a message that it didn’t match. Not perfect, but matches the rules we built on for this time around.
Tomorrow we’ll look at some code!