[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 200
  • Last Modified:

Passing a querystring with an '&' in it

I am having a problem passing a query string where my passed value contains an ampersand.  I hear there is a function to use, but I cannot find it...

0
ScottTiger
Asked:
ScottTiger
  • 3
  • 2
1 Solution
 
chumpCommented:
The javascript function escape() does a conversion for all characters not allowed in query string values.
escape('&') gives you %26.
0
 
jamestthomasCommented:
You can substitute the vbscript chr(38) in your string. It must be concatenated to the string.  for example:

"My stuff has an" & chr(38) & " in it"  
0
 
freshmeatCommented:
try:
<%=Server.URLEncode(yourVariableName)%>
if u r using ASP
:)
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
jamestthomasCommented:
I would agree with freshmeat.
0
 
jamestthomasCommented:
Actually, HTMLencode might work also
0
 
freshmeatCommented:
i mean
<a href="mypage.asp?param=<%=Server.URLEncode(yourVariableName)%>">

in ASP
sorry for my careless posting last time

0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now