how to validation this email id

Posted by Jayakumars under ASP.NET AJAX on 2/15/2012 | Points: 10 | Views : 1050 | Status : [Member] [MVP] | Replies : 2
hi

here i need email allow ._@ and numbers so i need only this how
will do this validations.


<asp:RegularExpressionValidator ID="Reg1" runat ="server"
ControlToValidate ="txtemail" ErrorMessage ="Invalid Email Address"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ></asp:RegularExpressionValidator>

Mark as Answer if its helpful to you


Responses

Posted by: Blessyjees on: 2/16/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi,

Try with this reg. expression ^\w+[\w-\.]*\@\w+((-\w+)|(\w*))\.[a-z]{2,3}$

valid formats: bob-smith@foo.com | bob.smith@foo.com | bob_smith@foo.com

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 2/16/2012 [Member] Silver | Points: 25

Up
0
Down
Hi ,
I tried giving a.1_z@a.com
The regular expression that you wrote allows .,number and _
What's your requirement?


Thanks,
Sanjay

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response