开发者

How to speed up a RegularExpressionValidator in asp.net?

开发者 https://www.devze.com 2023-02-27 01:56 出处:网络
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?

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

精彩评论

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

关注公众号