Disallow space using regular expression validator

  • Thread starter Thread starter Zorik
  • Start date Start date
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
 
The regular expression for no spaces is this one

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

or preferable this one

^[^\s]+$
 
Back
Top