开发者

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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜