Return to Snippet

Revision: 31553
at September 8, 2010 23:36 by housecor


Initial Code
protected void ValidEmail(object source, ServerValidateEventArgs args)
		{
			try
			{
				var a = new MailAddress(args.Value);
			}
			catch (Exception ex)
			{
				args.IsValid = false;
				return;
			}
			args.IsValid = true;
		}

Initial URL

                                

Initial Description

                                

Initial Title
Assure a valid email that .Net can actually send an email to is passed.

Initial Tags
email, validation

Initial Language
C#