Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

querystring question?

Status
Not open for further replies.

sweetleaf

Programmer
Jan 16, 2001
439
CA
Hi,

Can anyone pls tell me how to pass values?

I have a link which when clicked should send the "z" with an order # and "x" with a customer name to the same page.

<a href=&quot;page1.asp?z=<%=rst(&quot;order_no&quot;)%> & ?x=<% =rst(&quot;customer_name&quot;) %>&quot;>Edit</a>

what am i missing in the construction of my querystring?

thanks,
Mark
 
Try this....

<a href=&quot;page1.asp?z=<%response.write(rst(&quot;order_no&quot;))%>&x=<%response.write(rst(&quot;customer_name&quot;))%>&quot;>Edit</a>
 
Ive seen it around but never used it. Just habit i guess.
 
hi guys,

Thanks for your swift replies, I've tried all your suggestions but for some reason I'm getting &quot;z&quot; but not the value for &quot;x&quot;...

and the assignment for x definitely works.

i wonder why ??

thanks
 
When i use the same code to read the querystring for order_no it works though:

<td align=center>
Cust Name <br>
<input type=text id=cust name=cust style=&quot;width:140px; height:22&quot; value=&quot;<% =Request.QueryString(&quot;x&quot;)%>&quot;>
</td>

.. AND if in the above i replace &quot;x&quot; with &quot;z&quot; i am fine - the value of &quot;z&quot; will be displayed..
i must be setting the value of &quot;x&quot; wrong - but how?
 
When i use the same code to read the querystring for order_no it works though:

<td align=center>
Cust Name <br>
<input type=text id=cust name=cust style=&quot;width:140px; height:22&quot; value=&quot;<% =Request.QueryString(&quot;x&quot;)%>&quot;>
</td>

.. AND if in the above i replace &quot;x&quot; with &quot;z&quot; i am fine - the value of &quot;z&quot; will be displayed..
i must be setting the value of &quot;x&quot; wrong - but how?
 
try reading the querystring like this:

Code:
<td align=center>
Cust Name <br>
<input type=text id=cust name=cust style=&quot;width:140px; height:22&quot; value=&quot;<%=CStr(Request.QueryString(&quot;x&quot;))%>&quot;>
</td>

any good?? Tony
 
hey Tony!

thanks all of your for your valuable input -
i managed to get it up and working. the fix:

for some reason the interpreter wanted to see a space
b/w the last assignment and the next variable.
)%> &x=<%
and casting as Cstr helped to!

thanks again gang
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top