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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

strange behavior on variables in asp.

Status
Not open for further replies.

wvdba

IS-IT--Management
Jun 3, 2008
465
US
Hi.
i have this classic asp page (page1.asp).
variables are passed to it from a previous page (page0.asp).
i can write the passed values to the screen and verify them.
when i pass this value to another page (page2.asp), the values are blank. however if if set the values to constant in page1.asp, it works and they are carried to page2.asp. what can cause this, please.
thanks.
 
here's my code in page1.asp:
i get the code from page0.asp using querystring and print it to make sure i got it.

if parmvalue is a constant, it passes to page2.asp with no problem like this. if i set parmvalue to "1234" it's ok.
Code:
parmvalue = request.querystring("passedparms")
response.redirect ("Page2.asp?parm=" & parmvalue)
in page2.asp, i have this code:
Code:
myparm=request.querystring("parm")
response.write myparm
nothing shows up
 
this should work.
this is page1.asp and page2.asp, so what about page0.asp?
are u sure page0.asp calls page1.asp with:

Page1.asp?passedparms=...

?

BTW a variable "passedparmS" suggests that you actually pass more than 1 value.....




 
foxbox,
thanks for response. passedparms are two strings that are concatenated together with a hyphen, like this: 1234-5678
which will be split later. the strange thing is that when i set the variable in page1.asp as a constant, it works. but when i get it from page0.asp and verify it, it doesn't work.
 
?! strange. this works on my webserver:

page0.asp:
Code:
<%
response.redirect "page1.asp?p=1234-5678"
%>

page1.asp:
Code:
<%
response.redirect "page2.asp?p=" & request.querystring("p")
%>

page2.asp:
Code:
<%
response.Write request.querystring("p")
%>



 
ok.
i got this part to work ok.
thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top