Regex regex = new Regex(@"^([w.-]+)@([w-]+)((.(w){2,3})+)$");
Regex emailRegex = new Regex(@"^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+.[A-Za-z]{2,4}");
[RegularExpression(@"[A-Z0-9._%-]+@[A-Z0-9.-]+.[A-Z]{2,4}")]
public bool IsValid(string emailaddress)
{
try
{
MailAddress m = new MailAddress(emailaddress);
return true;
}
catch (FormatException)
{
return false;
}
}