Use RegularExpressions with TexBox

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
 
C

Carlos J. Quintero [.NET MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top