Showing posts with label regulart expression. Show all posts
Showing posts with label regulart expression. Show all posts
May 20, 2010
How to display an error message of a vaildation control all the time?
To display an error message of validation control all the time, set that error message in the "Text" property of validation control.
May 19, 2010
Regular Expression for AlphaNumeric Characters only
Regular Expression for AlphaNumeric Characters only :
^[0-9a-zA-Z\s]+$
It only allows 0-9,a-z, A-Z, $
^[0-9a-zA-Z\s]+$
It only allows 0-9,a-z, A-Z, $
Creating Regular Expression for Numeric Values and using it on a TextBox control in C#
//Creating regular expression for numeric values
Regex rxNum = new Regex(@"^[0-9\s]+$");
//using regular expression on a TextBox Control in C#
if (!rxNum.IsMatch(textbox1.Text))
Response.write("Textbox1 has Numeric value");
Regex rxNum = new Regex(@"^[0-9\s]+$");
//using regular expression on a TextBox Control in C#
if (!rxNum.IsMatch(textbox1.Text))
Response.write("Textbox1 has Numeric value");
Subscribe to:
Posts (Atom)