Click here to Skip to main content
11,487,721 members (72,306 online)
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 2:34am
stellus1.1K

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 Sergey Alexandrovich Kryukov 9,193
1 OriginalGriff 8,287
2 Sascha Lefèvre 3,334
3 Maciej Los 2,946
4 Richard Deeming 2,370


Advertise | Privacy | Mobile
Web02 | 2.8.150520.1 | Last Updated 24 Sep 2012
Copyright © CodeProject, 1999-2015
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