Click here to Skip to main content
11,705,753 members (49,125 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 1: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 OriginalGriff 218
1 Sergey Alexandrovich Kryukov 170
2 Inimicos 60
3 ProgramFOX 50
4 Richard MacCutchan 45
0 OriginalGriff 9,037
1 Sergey Alexandrovich Kryukov 8,417
2 CPallini 5,189
3 Maciej Los 4,726
4 Mika Wendelius 3,626


Advertise | Privacy | Mobile
Web03 | 2.8.150819.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