Validation ASP.Net Tutorial

You must set five properties when  using this control:
ControlToValidate:   The ID of the form field being validated.
Text:                The error message.
MinimumValue:        The minimum value.
MaximumValue:        The maximum value.
Type:                The type of comparison. 
                     Possible values are String, Integer, Double, Date, and Currency.
<%@ Page Language="C#" %>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


    Show RangeValidator


    
    

            id="lblAge"
        Text="Age:"
        AssociatedControlID="txtAge"
        Runat="server" />
            id="txtAge"
        Runat="server" />
            id="reqAge"
        ControlToValidate="txtAge"
        Text="(Invalid Age)"
        MinimumValue="5"
        MaximumValue="100"
        Type="Integer"
        Runat="server" />
            id="btnSubmit"
        Text="Submit"
        Runat="server" />