protected void btnVote_Click(object sender, System.EventArgs e) { Increment(); StrawPoll parent = (StrawPoll)Parent; if (parent.PollStyle == pollStyle.voteonly) { parent.PollStyle = pollStyle.valuesonly; } CandidateEventArgs eCandidate = new CandidateEventArgs(this); parent.ChildVote(eCandidate); }
protected void strawPoll1_Voted(object sender, CandidateEventArgs e) { resultLabel.Text = "You voted for " + e.OriginatingCandidate.Name + "."; }