Friday, February 5, 2016

Let just about everything but angle brackets through at an asp:RegularExpressionValidator at the C# side.

string quote = "\"";
MyControl.ValidationExpression = @"([a-z]*[A-Z]*[0-9]*[\.]*[\s]*[\']*[?]*[!]*[-]*[=]*[\*]*[:]*[;]*
      [,]*[\\]*[/]*[{]*[}]*[|]*[\[]*[\]]*[\(]*[\)]*[+]*[`]*[~]*[@]*[_]*[#]*[\$]*[%]*[\^]*[&]*[\" + quote +
      "]*)*";

No comments:

Post a Comment