ASP.NET 3.5 and above only

Poll - Validation - Custom Error Message


Favorite Movie
What is your favorite movie?
  • The Shawshank Redemption
  • The Godfather
  • Star Wars
  • Schindler's List
  • Pulp Fiction
Vote
Show Results
The Poll control offers the AnswersRangeErrorMessage property which can be used to specify the error message that will be displayed when the number of selected answers is outside the range indicated by the MinAnswers and MaxAnswers properties.
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="MultipleAnswers" MinAnswers="2"
     MaxAnswers="4" AnswersRangeErrorMessage="Please select between 2 and 4 answers.">

"Wau! (spanish esclamation) what speed!! About 30 seconds. Thanks for your answer."

Eduardo Sánchez
ABC Systems

Random testimonial   All testimonials