Parsing Parameters not working

P

Peter Bassett

For some reason when I call one ASP program from another, I am not parsing
out the parameters correctly.

Caling ASP has
<a href="[email protected]?id=A1234?title=Sales?code=HR">blah</a>

In the called ASP, I write this:
response.write("Unparsed: " & Request.QueryString)
response.write("To = " & Request.QueryString("to"))
response.write("Title = " & Request.QueryString("title"))
response.write("Code = " & Request.QueryString("code"))
response.write("ID = " & Request.QueryString("id"))

Output is:
Unparsed: [email protected]?id=A1234?title=Sales?code=HR
To = (e-mail address removed)?id=A1234?title=Sales?code=HR
Title =
Code =
ID =

Am I crazy or should Title, Code, and ID NOT be empty. I am missing
something obvious here. Please help!

Thanks!
Pete
 
A

Alan

Your first querystring term should be prefixed with a '?', subsequent terms
prefixed with '&'.

Try this:

<a href="[email protected]&id=A1234&title=Sales&code=HR">blah</a>

Alan
 
R

Ray at

Yes, it is obvious. ;] You want to separate your querystring parameters
with a &, not a ?.

A href="foo.asp?to=name&id=A1234&title=Sales&code=HR"

Ray at home
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top