The RangeValidator Server Control:
The RangeValidator control is quite similar to that of the CompareValidator control, but it makes sure that the end user value or selection provided is between a specified range as opposed to being just greater than or less than a specified constant. For an example of this, go back to the text-box element that asks for the age of the end user and performs a validation on the value provided.
Using the RangeValidator control to test an integer value
<asp:TextBox ID=”TextBox1″ Runat=”server”></asp:TextBox>
<asp:RangeValidator ID=”RangeValidator1″ Runat=”server”
ErrorMessage=”You must be between 30 and 40″
Other Related Posts: