473,324 Members | 2,268 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Use RegularExpressions with TexBox

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
Nov 16 '05 #1
3 1050
I think i must use Regex class.

"Gonçalo Boléo" <gb****@netcabo.pt> wrote in message
news:ev*************@TK2MSFTNGP11.phx.gbl...
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

Nov 16 '05 #2
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
"Gonçalo Boléo" <gb****@netcabo.pt> escribió en el mensaje
news:ev*************@TK2MSFTNGP11.phx.gbl...
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

Nov 16 '05 #3
Gonçalo

http://www.regexlib.com/Default.aspx

Maybe it helps you,

Cor
Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: albertoalar | last post by:
I m trying to intercept a return in a texbox (Pocket pc ) when a barcode is writed. I need help thanks
8
by: Richard Lionheart | last post by:
Hi All, I tried using RegEx, but the compiler barfed with "The type of namespace 'RegEx' could not be found. Prior to this, I had the same problem with MatchCollection, but discovered it's...
0
by: Neo The One | last post by:
I find some of the Regex classes are quite helpful for my learning. For example: System.Web.RegularExpressions.SimpleDirectiveRege...
2
by: chris fink | last post by:
Using regular expression testers such as Expresso or Dan Appleman's tester, I have a regular expression that tests fine and is returning matches. However, when the same regex is run through code,...
9
by: Marcel Saucier | last post by:
Hello, I want to create several texboxes on a form and I would like to refer to them (properties, etc) in a form of an array. Is that possible ? Example: Instead of...
0
by: Yog | last post by:
Hi, How to access the value of a Texbox column(Template field) in gridview and to update a column next to it in the Gridview...! Example:Let's say there are four columns Product,Cost,Quantity...
3
by: Curious | last post by:
I have another question about Regular Expression. If I use: if (temp.Contains("Ending") == true) { temp = System.Text.RegularExpressions.Regex.Replace(temp, "Ending", "Beginning"); } It...
3
by: menakavenkatesh | last post by:
i want simple coding for changing fontsize of the texbox
4
by: Ken Fine | last post by:
I'm making an administrative interface that lists records in a GridView. For *each* row in the gridview, I would there to be two interface elements in addition to some information associated with...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.