ASP.NET 3.5 and above only

Poll - Results - Text Align


Left Aligned
    
Right Aligned


Favorite Movie
What is your favorite movie?
  • The Shawshank Redemption
    21.21%
  • The Godfather
    23.33%
  • Star Wars
    29.18%
  • Schindler's List
    13.38%
  • Pulp Fiction
    12.91%
Use the ResultStyle.TextAlign property to specify the alignment for the results text (when the results are not filled with empty space). Possible values are TextAlign.Right.
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 FillWithEmptySpace="false" />
</obout:Poll>
CS
protected void Page_load(object sender, EventArgs e)
{
Poll1.ResultStyle.TextAlign = OboutRadioButton1.Checked ? TextAlign.Left : TextAlign.Right;
}

"I have used a number of editors over the years and yours is by far the best!"

Tom Hechtman

Random testimonial   All testimonials