Thursday, 9 February 2017

Regular Expression Validator for email in VB.NET or ASP.NET

Dear All.

For email validation place range validator in the user form and edit the code with the given 'ValidationExpression" as  below.

<asp:RegularExpressionValidator ID="validateEmail"    
  runat="server" ErrorMessage="Invalid email."
  ControlToValidate="txtEmail" 
  ValidationExpression="^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$" />
 
 
All the best.
 
 

1 comment:

  1. Ukrainian software developers have a strong skill set, they are tech savvy, up to date with recent innovations and have an independent thinking. Moreover, Ukraine offers intermediate prices of $25-$49/hour for its software developers in comparison to the engineers from other eastern European countries. Learn more about Ukrainian software developers.

    ReplyDelete