[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Passing & as a parameter value

Posted on 2004-08-16
7
Medium Priority
?
296 Views
Last Modified: 2012-05-05
Is there a way of passing an & as a querystring value.

We are having a problem as obviously the & is used to seperate parameters but we need to pass one as part of a paramater.

2.asp?CoName=Alf & Burns
0
Comment
Question by:Kels
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 10

Expert Comment

by:Jay Toops
ID: 11811168
You must use the function urlencode("Alf & Burns")

example:

<%
response.write(Server.URLEncode("http://www.w3schools.com"))
%>Output:

http%3A%2F%2Fwww%2Ew3schools%2Ecom

special characters are meta-escaped using this
and are AUTOMATICALLY decoded by the server
so when you are processing this with your handler
you don't have to do anything else.

Jay
0
 
LVL 6

Accepted Solution

by:
philjones85 earned 375 total points
ID: 11811890
2.asp?CoName=Alf & Burns

place %26 in place of & and place %20 in place of spaces


string should be:

2.asp?CoName=Alf%20%26%20Burns
0
 
LVL 6

Expert Comment

by:philjones85
ID: 11811916
http://www.w3schools.com/html/html_ref_urlencode.asp

complete list of url encoded characters
0
Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

 
LVL 35

Expert Comment

by:YZlat
ID: 11812130
try this:

strString = replace(strString,"&","&amp;")
0
 
LVL 35

Expert Comment

by:YZlat
ID: 11812346
also try

strString=replace( strString,"&","and")
0
 
LVL 13

Expert Comment

by:davidlars99
ID: 11814135
hi,
in javascript you'd do escape(2.asp?CoName=Alf & Burns)
and unescape()

cheers!
 dave
0
 
LVL 10

Expert Comment

by:Jay Toops
ID: 12078169
HI.. could you award points for this?
Id really appreciate it..

Jay
0

Featured Post

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question