Disallow space using regular expression validator

Z

Zorik

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
 
G

Guest

The regular expression for no spaces is this one

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

or preferable this one

^[^\s]+$
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top