punctuation

  • Thread starter Thread starter frazer
  • Start date Start date
F

frazer

how do i ensure the user always enters alphanumeric characters in my text
box. no spaces or punctuations?
 
try regular expressions. "[a-zA-Z0-9]" would match alphanumeric
characters.
 
Hi,

You can use the KeyPress event of the textbox and set the Handled property
of the event args ( do not remember the exact type )

Cheers,
 

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

Back
Top