ASP.NET(vb.net) & RangeValidator - asp:RangeValidator : Evaluates the value of an input control to determine whether it is between the specified upper and lower boundaries.
ShotDev Focus:
- ASP.NET(vb.net) & RangeValidator
Tag Control
<asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="RangeValidator"></asp:RangeValidator>
Example
RangeValidator.aspx
<%@ Page Language="VB" %> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <form id="form1" runat="server"> Input Number 0-99<br /> <asp:TextBox id="txtNumber" runat="server"></asp:TextBox> <asp:RangeValidator id="myRangeValidator" runat="server" ErrorMessage="Input Number 0-99" MaximumValue="99" MinimumValue="0" ControlToValidate="txtNumber" Type="Integer"></asp:RangeValidator><br /> <asp:Button id="btnSubmit" runat="server" Text="Submit" /> </form> </body> </html>
Screenshot