How to validate email address in ASP.NET

You could validate email address using the following ASP.NET code.

using System.Text.RegularExpressions;

….

// Validate the supplied email address
if( !Regex.Match(Request.Form[“email”],
@”\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*”,
RegexOptions.None).Success)
{
// Invalid email address
}