Friday, February 11, 2011

Email validation c# asp.net 4.0

 public static bool IsValidEmailAddr(string email)
    {
      try
      {
        System.Net.Mail.MailAddress addr = new System.Net.Mail.MailAddress(email);
      }
      catch
      {
        return false;
      }
      return true;
    }

1 comment:

darichkid said...

Rajeev

This is an excellent component for verifying email addresses:
http://www.kellermansoftware.com/p-37-net-email-validation.aspx