RangeValidator查一下会抛出什么异常!!

解决方案 »

  1.   

    错误提示如下:异常详细信息: System.Web.HttpException: 最大值 16 不能小于 RangeValidator1 的最小值 6。源错误: 执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 
      

  2.   

    you are setting the wrong values for MaximumValue and MinimumValue<form runat="server">
            <asp:TextBox id="TextBox1" runat="server"></asp:TextBox>
            <asp:RangeValidator id="RangeValidator1" runat="server" ErrorMessage="must be between 6 and 16" ControlToValidate="TextBox1" Type="Integer" MaximumValue="16" MinimumValue="6"></asp:RangeValidator>
        </form>