ASP.NET 3.5 and above only

Poll - Results - Display Percentages


Display Percentages


Favorite Movie
What is your favorite movie?
  • The Shawshank Redemption (519 votes)
    19.01%
  • The Godfather (674 votes)
    24.69%
  • Star Wars (812 votes)
    29.74%
  • Schindler's List (365 votes)
    13.37%
  • Pulp Fiction (360 votes)
    13.19%
Use the ResultStyle.DisplayPercentages property to indicate whether the percentage for each answer should be displayed in the Results mode.
ASP.NET
<%@ Register Assembly="Obout.Ajax.UI" Namespace="Obout.Ajax.UI.Poll" TagPrefix="obout" %>
<obout:Poll runat="server" ID="Poll1" DataSourceID="SqlDataSource1" 
     Title="Favorite Movie" Question="What is your favorite movie?"
     AllowedVotesPerUser="100" VotingMode="SingleAnswer" CurrentMode="Results">
    <ResultStyle DisplayVotes="true" />
</obout:Poll>
CS
protected void Page_load(object sender, EventArgs e)
{
Poll1.ResultStyle.DisplayPercentages = OboutCheckBox1.Checked;
}

"Thank you!!! ... Awesome customer service!! :)"

Romi Kovacs

Random testimonial   All testimonials