Range Validation

Ranjeet_8
Posted by Ranjeet_8 under ASP.NET category on | Points: 40 | Views : 1146

<asp:TextBox ID="tbox1" runat="server" />
<asp:RangeValidator ID="RangeValidator1" ControlToValidate="tbox1" MinimumValue="1"
MaximumValue="16" Type="Integer" ErrorMessage="Range 1 - 16" runat="server" />

You can set range like :
1. MinimumValue="1" and MaximumValue="500" Type="Integer"
2. MinimumValue="2005-01-01" MaximumValue="2005-12-31" Type="Date"

Note : You can specifies the data type of the value to check. The types are:
.Currency,
.Date,
.Double,
.Integer,
.String

Comments or Responses

Login to post response