using RegularExpressionValidator

asp.net Thailand
  • 12 years ago

    Hi,

    I want to use RegularExpressionValidator (asp.net and c#) to prevent users in entering these characters: ~ | { }

    What will be my ValidationExpression?

    [any validator control will do.. ]

    Thanks in advance! Smiley Face

  • 12 years ago

    I believe this will work

    ValidationExpression="[^~,^|,^{,^}]*"

  • 12 years ago

    aw! i really don't understand regex, so you are really of help..

    thanks again..

    Cool

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“My definition of an expert in any field is a person who knows enough about what's really going on to be scared.” - P. J. Plauger