p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 1.0 and 1.1 Basics (http://p2p.wrox.com/forumdisplay.php?f=60)
-   -   validation (http://p2p.wrox.com/showthread.php?t=48927)

abhishekdubey_997 October 12th, 2006 06:52 AM

validation
 
hi, im new to asp.net
im doing my coding in web applications in vb.net
what im trying to do is to validate a text box such that it shld accept only following four inputs.....
1) uppercase alphabets
2)lower case alphabets
3)dots
4)spaces
thats it n i have tried hard bt not able to discover it.....
any help would be of gr8 help...
thanx in advance.


mike_remember October 12th, 2006 07:09 AM

Hey

Please elaborate a bit more exactly what u want, what else is left after these four options. do u want to block numbers, special characters!!!!!

Regards
Mike

dparsons October 12th, 2006 07:28 AM

You need is a regex:

http://www.regular-expressions.net/

For example, to validate only upper and lower case the expression is: [a-z][A-Z]

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature

abhishekdubey_997 November 3rd, 2006 02:07 AM

thanks for the reply mike.
bt i only want to validate a textbox which shld accept
1)a-z
2)A-Z
3)dots
4)spaces
thats it
other than it i want to block all other characters
im using asp.net in vb language
plz help me
thnks in advance


dparsons November 3rd, 2006 09:16 AM

Again, i reiterate, you will need to write a Regular Expression to validate your string:

http://www.regular-expressions.net/

the expression [a-z][A-Z] will capture upper and lower case characters, you just need to write the rest of the expression to handle dots and spaces.

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature


All times are GMT -4. The time now is 10:15 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.