Click here to Skip to main content
10,500,000 members (76,716 online)

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 ProgramFOX.
Tags:


Advertise | Privacy | Mobile
Web01 | 2.8.150819.1 | Last Updated 5 Nov 2009
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid