Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Character Filtering in a Text Box?

Status
Not open for further replies.

Tr0

Programmer
Jul 12, 2007
24
US
I'm a newbie to ASP. I was wanting to do some character filtering in a text box and wondering what the best way to do it is?

For example, I have a text box and lets say I want to filter out curly brackets "{" if someone enters that character. If they were to enter this character in the text box a Message Box would appear saying something like invalid character.

Is there a quick and easy way of doing this?

Any suggestions would be a big help!

Thanks.
 
Looks like you would be better doing this clientside initially if you want to alert the user. Go to forum216 and click on the FAQ tab. You will find several examples under the 'Validation' heading.

If you just want to remove the character serverside from the returned string using ASP, then look at the Replace function.

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top