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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Select? with special characters

Status
Not open for further replies.

njitter

Technical User
Joined
Sep 4, 2001
Messages
122
Location
US
Hi,

i'm using FP2000 with an Access 97 DB. I have the following ASP select string on one of my pages:

medewerkers.asp?SelectAfdeling=A&I&SelectHoofdAfdeling=QA/QS#Medewerkers per afdeling

(afdeling means Department)

The problem is the A&I department. The retrieval does not work. How do i tell ASP i want search for the text A&I ?

Thanks already for your help!

---
There are no stupid Questions -- just stupid People
 
That ampersand in the department name will not work in a querystring. You can explicitly replace it with %26 (I think), or better yet use the Server.URLEncode() method to replace possible special characters in any department name with the hexadecimal equivalent.

Code:
vDepartment = Server.URLEncode(strDepartment);
 
If not in the URL string then you want to write it with

Response.Write Server.HTMLEncode( string )

"The HTMLEncode method applies HTML encoding to a specified string.

Syntax
Server.HTMLEncode( string )

Parameters
string
Specifies the string to encode. "
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top