Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all,

I am doing one project using vb.net(ASP.NET) in that i have one douts in registration page, where the field is,

enter your email id =------------ //(textbox)

in this am using validation control (using script), when i enter invalid id( eg:abc) it showing enter your valid email id,again i had enter valid mail id (eg:abc@gmail.com) the page would execute, but my dout is when i enter one email id like eg: abc@gmail.commu,
which is also execute in the page ,i dont know why whether the above mentioned mail id is valid or not, please give me a drop of solution for this its very urgent..


thanks in advance..
Posted

1 solution

Hi U can use Regular Expression Validator control to acheive this.

pass following as validation expression

ValidationExpression="^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900