473,473 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Parsing Parameters not working

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

Caling ASP has
<a href="fo*************@aol.com?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: to*****@aol.com?id=A1234?title=Sales?code=HR
To = na**@aol.com?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
Jul 19 '05 #1
3 3394
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

--
Will trade ASP help for SQL Server help
"Peter Bassett" <pb**********@comcast.net> wrote in message
news:Xn**********************************@204.127. 204.17...
For some reason when I call one ASP program from another, I am not parsing
out the parameters correctly.

Caling ASP has
<a href="fo*************@aol.com?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: to*****@aol.com?id=A1234?title=Sales?code=HR
To = na**@aol.com?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

Jul 19 '05 #2
Your first querystring term should be prefixed with a '?', subsequent terms
prefixed with '&'.

Try this:

<a href="fo*************@aol.com&id=A1234&title=Sales &code=HR">blah</a>

Alan

"Peter Bassett" <pb**********@comcast.net> wrote in message
news:Xn**********************************@204.127. 204.17...
For some reason when I call one ASP program from another, I am not parsing
out the parameters correctly.

Caling ASP has
<a href="fo*************@aol.com?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: to*****@aol.com?id=A1234?title=Sales?code=HR
To = na**@aol.com?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

Jul 19 '05 #3
Thanks - I've been working too long today!

Pete
"Alan" <SP******************@inspire.net.nz> wrote in
news:OJ*************@TK2MSFTNGP12.phx.gbl:
Your first querystring term should be prefixed with a '?', subsequent
terms prefixed with '&'.

Try this:

<a
href="fo*************@aol.com&id=A1234&title=Sales &code=HR">blah</a>

Alan

"Peter Bassett" <pb**********@comcast.net> wrote in message
news:Xn**********************************@204.127. 204.17...
For some reason when I call one ASP program from another, I am not
parsing out the parameters correctly.

Caling ASP has
<a
href="fo*************@aol.com?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: to*****@aol.com?id=A1234?title=Sales?code=HR
To = na**@aol.com?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



Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Gerrit Holl | last post by:
Posted with permission from the author. I have some comments on this PEP, see the (coming) followup to this message. PEP: 321 Title: Date/Time Parsing and Formatting Version: $Revision: 1.3 $...
1
by: Andre Ranieri | last post by:
I'm having trouble programatically inserting an Excel file into an Image column in our CRM package's SQL 2000 database. The function appears to work ok, but when I attempt to access the file through...
1
by: mriedel | last post by:
I'm using the InstallContext class to parse the command-line arguments of a console application. The arguments are in the form of "-file=myFile.txt -flag", and the InstallContext object gives me what...
0
by: nole369 | last post by:
Hi, I am working with wsdl4j now trying to create a parser that will pull out the part names from the messages in the web service (wsdl) document. Although sometimes these part names are descriptive...
5
by: randy | last post by:
Can some point me to a good example of parsing XML using C# 2.0? Thanks
3
by: toton | last post by:
Hi, I have some ascii files, which are having some formatted text. I want to read some section only from the total file. For that what I am doing is indexing the sections (denoted by .START in...
3
by: aspineux | last post by:
My goal is to write a parser for these imaginary string from the SMTP protocol, regarding RFC 821 and 1869. I'm a little flexible with the BNF from these RFC :-) Any comment ? tests= def...
13
by: Chris Carlen | last post by:
Hi: Having completed enough serial driver code for a TMS320F2812 microcontroller to talk to a terminal, I am now trying different approaches to command interpretation. I have a very simple...
2
by: gdczinan | last post by:
Hi, All: I am quite new to the XML and have the following problem: I have the sample xml to read. <lr:LogRecordBody> <lr:EventID>9</lr:EventID> <lr:EventSubType...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.