How to speed up a RegularExpressionValidator in asp.net?
I have a text box that is using a RegularExpressionValidator
to check that a string is in the co开发者_C百科rrect format, and it is taking roughly 20 seconds to check. Is there a way to speed it up?
<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>
精彩评论