Click here to Skip to main content
15,885,757 members
Articles / Web Development / ASP.NET / ASP.NET2.0

to validate for numbers and alphabets in c# asp.net2.0 in codebehind file

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
28 Dec 2012CPOL 0  
Hi,Try this:bool includesNotOnlyNumeric = Regex.IsMatch(textBox.Text, @"\D");if (includesNotOnlyNumeric){ // don't show an alert box}else{ // show an alert box}

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Student
Europe Europe
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions