我有一个文本框,使用RegularExpressionValidator
检查字符串格式是否正确,大约需要20秒才能检查。有没有办法加快速度?
<asp:TextBox runat="server" ID="txtNumber"
width="9 em"
text='<%#Eval("strNumber")%>' AutoPostBack="true"
MaxLength="16" ontextchanged="txtNumber_TextChanged" />
<asp:RegularExpressionValidator
ID="NumberLength"
runat="server"
ValidationExpression="^\S{13,16}$"
ErrorMessage="Invalid Number"
Display="None" ControlToValidate="txtNumber"/>
<ajax:ValidatorCalloutExtender
ID="ValidatorCalloutExtender1"
runat="server" TargetControlID="NumberLength">
</ajax:ValidatorCalloutExtender>