Use RegularExpressions with TexBox

  • Thread starter Thread starter Gonçalo Boléo
  • Start date Start date
G

Gonçalo Boléo

Can i validate a TextBox with a regular expression without using
RegularExpressionValidator?
Can i use a function to do this?

I wan't to throw an error different from the way RegularExpressionValidator
does.

thanks,
Gonçalo Boléo
 
You can use the static System.Text.RegularExpressions.Regex.Match(input,
pattern, options) function and throw whatever you want.

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
 
Back
Top