ASP.NET 3.5 and above only

Poll - Results - Display Percentages


Display Percentages


Favorite Movie
What is your favorite movie?
  • The Shawshank Redemption (2023 votes)
    21.21%
  • The Godfather (2225 votes)
    23.33%
  • Star Wars (2781 votes)
    29.16%
  • Schindler's List (1276 votes)
    13.38%
  • Pulp Fiction (1231 votes)
    12.91%
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;
}

"We are really liking your grid.It is really a great control."

Nauman Cheema
DHS

Random testimonial   All testimonials