The task at hand is to validate the Textbox in asp.net for a valid email address.
We can attach a RegularExpressionValidator to the text box with the following regular expression:
<asp:RegularExpressionValidator ValidationExpression="^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$" ID="rxpEmail" runat="server"
ErrorMessage="Email Address is not valid" Text="*" Display="Static" ControlToValidate="txtEmail"></asp:RegularExpressionValidator>
Well i searched the net for the standards of a valid email id and i came across with a wonderful article at
I Knew How To Validate An Email Address Until I Read The RFC
It gives a an idea of what an exact RFC standard for the email id is.
I believe that we should follow validations which are quite obvious to the users and allow only standard email addresses.


Regular Expression for Email Address validation in C#…
You’ve been kicked (a good thing) – Trackback from DotNetKicks.com…
Great Article
We can also submit our .net related links on http://www.dotnettechy.com to improve traffic.
The dotnettechy.com is a community of .Net developers joined together to learn, to teach, to find solutions, to find interview questions and answers, to find .net website / blog collection and to have fun programming.
Excellent validation! Good work!