当我设置文本框的范围时,当我删除或评论它时出现错误页面运行请查看我的代码并告诉我其中的错误。
<asp:TextBox ID="TxtName" runat="server" ValidationGroup="Adduser" MaxLength="32"
Width="200px"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ValidationGroup="Adduser"
ErrorMessage="Provide user name" ControlToValidate="TxtName" Display="Dynamic">*</asp:RequiredFieldValidator>
<%--<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ValidationGroup="Adduser" ControlToValidate="TxtName" ErrorMessage="User ID Must be at least 8 Alpha Numeric Characters." ValidationExpression="^[a-zA-Z0-9]{8,}$">*</asp:RegularExpressionValidator>--%>
<asp:RangeValidator ID="RangeValidator2" runat="server" ErrorMessage="The ID Must Be 8 Characters." MaximumValue="32" MinimumValue="8" ControlToValidate="TxtName" Type="String"></asp:RangeValidator>
</td>