The RangeValidator control verifies that the input value falls within a predetermined range.
It has three specific properties:
| Properties | Description |
|---|---|
| Type | It defines the type of the data. The available values are: Currency, Date, |
| MinimumValue | It specifies the minimum value of the range. |
| MaximumValue | It specifies the maximum value of the range. |
The syntax of the control is as given:
<asp:RangeValidator ID="rvclass" runat="server" ControlToValidate="txtclass"
ErrorMessage="Enter your class (6 - 12)" MaximumValue="12"
MinimumValue="6" Type="Integer">
</asp:RangeValidator>