Hi Arjun,
You can throw in a string validation for email using regex!
you can use the pattern:
string emailValidationPattern = "^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$";
An other option is to use a trick to check it with creating a new MailAddress:
public bool IsValid(string emailaddress)
{
try
{
MailAddress m = new MailAddress(emailaddress);
return true;
}
catch (FormatException)
{
return false;
}
}
Cheers,
Edo