Checking the Range of a Number through the RangeValidator Control (VB.net) : Number « Validation by Function « ASP.Net






Checking the Range of a Number through the RangeValidator Control (VB.net)

<%@ Page Language=VB Debug=true %>
<HTML>
<HEAD>
<TITLE>Checking the Range of a Number through the RangeValidator Control</TITLE>
</HEAD>
<form runat="server">
<BR><BR>
Enter a Number:<BR>
<asp:textbox 
    id="txtNumber" 
    runat=server 
/>
<asp:rangevalidator 
    id="rngQuantity" 
    controltovalidate="txtNumber" 
    type="Integer" 
    minimumvalue=5
    maximumvalue=44
    display="Dynamic"
    font-name="Verdana"
    font-bold="True"
    font-size="10pt"
    forecolor="blue"
    runat="server">
    The Quantity field must be from 5 to 44!
</asp:rangevalidator>
<BR><BR>
<asp:button 
    id="butOK"
    text="OK"
    type="Submit"
    runat="server"
/>
</form>
</BODY>
</HTML>
           
       








Related examples in the same category

1.Validation control:a postive whole number (VB.net)
2.Comparing a Field to a Numeric Data Type using the CompareValidator Control (VB.net)
3.Validating Against a Positive Even Whole Number using the CustomValidator Control (VB.net)