I have used the following code but it is returning false though it should return true
string check,zipcode;
zipcode=\"10001 New York, NY\";
check=isalpha
Try this one:
public static Boolean isAlphaNumeric(string strToCheck)
{
Regex rg = new Regex(@"^[a-zA-Z0-9\s,]*$");
return rg.IsMatch(strToCheck);
}
It's more undestandable, if you specify in regex, what your string SHOULD contain, and not what it MUST NOT.
In the example above: