david.brent
Registered User.
- Local time
- Today, 01:29
- Joined
- Aug 25, 2004
- Messages
- 57
Hello everyone,
How do you all deal with + and & when sending info to an ASP?
Some of our Reference fields contain + and/or &
When the user enters a ref containing + eg SMITH+1, SMITH 1 is sent to the SQL server stored procedure.
When the user enters a ref containing & eg SMITH+1, SMITH is sent to the SQL server stored procedure.
Obviously, this isn't ideal.
I have looked at using Replace on the sending page and then on the ASP eg
Sending Page
Replace(mr,"+","***")
ASP
Replace(mr,"***","+")
I have also looked at conventing to ASCII using .charCodeAt(0)
and then reversing it with .fromCharCode(...)
Any thoughts or examples would be greatfully recieved.
Cheers
How do you all deal with + and & when sending info to an ASP?
Some of our Reference fields contain + and/or &
When the user enters a ref containing + eg SMITH+1, SMITH 1 is sent to the SQL server stored procedure.
When the user enters a ref containing & eg SMITH+1, SMITH is sent to the SQL server stored procedure.
Obviously, this isn't ideal.
I have looked at using Replace on the sending page and then on the ASP eg
Sending Page
Replace(mr,"+","***")
ASP
Replace(mr,"***","+")
I have also looked at conventing to ASCII using .charCodeAt(0)
and then reversing it with .fromCharCode(...)
Any thoughts or examples would be greatfully recieved.
Cheers