Is AlphaNumeric Validation

Nadeemshaik
Posted by Nadeemshaik under C# category on | Points: 40 | Views : 843
 public  bool IsAlphaNumeric(string stringValue)
{
bool m_result = true;
string m_strValue = stringValue.Trim();

System.Text.RegularExpressions.Regex rx = new System.Text.RegularExpressions.Regex(@"^[a-zA-Z0-9]*$");
if (!rx.IsMatch(m_strValue))
{
m_result = false;
}
return m_result;
}

Comments or Responses

Login to post response