How to validate corporate or business email address in

In this article I am going to explain how to validate corporate or business email address in using RegularExpression.

How to validate corporate or business email address in

Recently I have got a requirement, only business or corporate email address need to be entered. So I have to validate the free email address like Gmail, yahoo, Rediff, hotmail etc.


I have used the Regular expression validator control to validate. Add the below given code:

Add a webform to project. Drag and drop the textbox and Regularexpressionvalidator from toolbox to webform

Complete HTML Markup of Webform:
  <fieldset style="width:50%">
    <legend>validate corporate email address </legend>
    <tr><td>Enter Email :</td><td>
         <asp:TextBox ID="txtemail" runat="server"></asp:TextBox>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="Please Enter Bussnies Email Id"         
            ControlToValidate="txtemail" ForeColor="#FF3300"></asp:RegularExpressionValidator></td></tr>

Now run the project and test it.

Post a Comment



Contact Form


Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget