Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Regex works in aspx but not .cs

Options
  • 24-05-2012 11:57am
    #1
    Registered Users Posts: 1,002 ✭✭✭


    I have a RegularExpressionValidator in a .aspx page that validates a string in a textbox. It works perfectly.
    I have the same Regex in a compiled application and it doesn't work exactly like the aspx version.
    What could cause the difference in the way the regex works?


Comments

  • Registered Users Posts: 669 ✭✭✭whatstherush


    MS Doc on the RegularExpressionValidator mentions validation could be different between the client and server.

    "On the client, JScript regular expression syntax is used. On the server, Regex syntax is used. Because JScript regular expression syntax is a subset of Regex syntax, it is recommended that you use JScript regular expression syntax in order to yield the same results on both the client and the server."


Advertisement