Click here to Skip to main content
15,890,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want validate my text box with valid email id means not accept 12@1.1....
if i enter 1@f.in it accept...

what is the code for it not accept only numbers id ...
plz rpl..
Posted

Try using regular expression
ValidationExpression="\w+([-+.&]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*([,;]\s*\w+([-+.&]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*)*"
 
Share this answer
 
Comments
ErBhati 18-May-13 3:33am    
Thanks Ashish ,
Your solution help me a lot to make my own custom validation which i want..
Hi,

try with regular expression validator with validation expression as \w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*

RegularExpressionValidator In ASP.NET[^]

hope it helps.
 
Share this answer
 
v2
Thanks to all....
I solved it....
 
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