Click here to Skip to main content
13,589,827 members

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

Revision 1
Hi,

Try this:
bool includesNotOnlyNumeric = Regex.IsMatch(sample1, @"\D");
if (includesNotOnlyNumeric)
{
    // don't show an alert box
}
else
{
    // show an alert box
}
Posted 28-Dec-12 22:18pm by Thomas D [ProgramFOX].
Tags:
  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web01-2016 | 2.8.180618.1 | Last Updated 5 Nov 2009
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid