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!

Passing variables question

Status
Not open for further replies.

bipink

Programmer
Apr 15, 2004
14
US
Hi everyone,

Is it possible to pass only variables bt. ASP pages.
I have 3 asp pages.
In page1.asp, I have a text box text1.
When I submit this page, in page2.asp I use the contents of page1's text1 as var2= Request.form("text1") and on doing some db query, I get some value for text box text2 on page2.asp.
Now when I press the submit on page2, I want to have both values of text boxes of page1.asp and page2.asp. But now the problem is my page3.asp receives only the value of text2 and NOT text1 (var2).
So, I get var32 = Request.form("text2").

But this doesn't work -> var31=Request.form("var2");

How do I then get var2 from page2.asp on page3.asp. In other words how to get value of text1 from page1.asp on page3.asp ?

One way is to make a hidden textbox on page2 and store the value of text1 in it and retrieve it on page3. Is there a better way ?

Thanks,

Bipin
 
Hidden field or on page 2 store the value in a Session variable. I suggest you put it in a hidden field.

Hope this helps.
 
bipink, you asked the same question in thread333-824571 , a extremely feasible answer was delievered to you, in working and demonstrated code, if you'd like a better explaination of the code you're welcome to ask back in that thread

also in the other thread, the prior form values can be hidden or visible, if they are made disabled they wont carry across. also if you use a naming convention for the field names and locations, you can then use this to filter which ones you want hidden or visible.

if you do not understand the asp code i would be more htan happy to help explaining it in more detail
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top