469,315 Members | 1,569 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,315 developers. It's quick & easy.

Disallow space using regular expression validator

I am building a form in asp.net 2.0
On one of the textboxes, I don't want that the user will use the space
character.
How do I disallow space using regular expression validator (or other
validator) ?

Thanks

ra294


Nov 15 '06 #1
1 16621
The regular expression for no spaces is this one

^[a-zA-Z0-9]+$

or preferable this one

^[^\s]+$
--
Bits. Bytes.
http://bytes.thinkersroom.com
------------------------------
"Zorik" wrote:
I am building a form in asp.net 2.0
On one of the textboxes, I don't want that the user will use the space
character.
How do I disallow space using regular expression validator (or other
validator) ?

Thanks

ra294


Nov 15 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by UndoMiel | last post: by
16 posts views Thread by simonc | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.