Unwanted Comma

P

PW

I'm testing the output of variables passed from my 1st ASP to my 2nd ASP.

This is the code ...

<%
response.write "C-" & request.querystring("myCounter")
response.write "<br>"
response.write "1-" & request.querystring("txtBCQty1")
response.write "<br>"
response.write "2-" & request.querystring("txtBCQty2")
response.write "<br>"
response.write "3-" & request.querystring("txtBCQty3")
response.write "<br>"
response.write "4-" & request.querystring("txtBCQty4")
response.write "<br>"
response.end
%>

This is the output ...

C-4
1-32,
2-45
3-67
4-99


Why is there a comma after the value "32" ???
 
A

Aaron Bertrand [MVP]

Because you have two form elements on the previous page named txtBCQty1?
 
L

Larry Bud

PW said:
I'm testing the output of variables passed from my 1st ASP to my 2nd ASP.

This is the code ...

<%
response.write "C-" & request.querystring("myCounter")
response.write "<br>"
response.write "1-" & request.querystring("txtBCQty1")
response.write "<br>"
response.write "2-" & request.querystring("txtBCQty2")
response.write "<br>"
response.write "3-" & request.querystring("txtBCQty3")
response.write "<br>"
response.write "4-" & request.querystring("txtBCQty4")
response.write "<br>"
response.end
%>

This is the output ...

C-4
1-32,
2-45
3-67
4-99


Why is there a comma after the value "32" ???

Because your querystring must say something like

?mycounter=4&txtBCQty1=32,&txtBCQty2=45

etc....
 

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

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top