Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VS2005 ASP.NET VB.NET
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 24-Sep-12 1:34am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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})$
  Permalink  

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

  Print Answers RSS
0 Gihan Liyanage 332
1 Sergey Alexandrovich Kryukov 250
2 ClimerChinna 222
3 vikinghunter 188
4 OriginalGriff 161
0 Sergey Alexandrovich Kryukov 8,373
1 OriginalGriff 7,112
2 CPallini 2,598
3 Richard MacCutchan 2,025
4 Abhinav S 1,788


Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 24 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100