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!

passing a variable between pages?

Status
Not open for further replies.

pilg

Programmer
Feb 16, 2001
82
GB
Hi,

I'm new to this asp stuff and some help is needed.

I have a variable 'TableName' which is selected from a list box on my first page and passed to my next page, I then use this variable to vary what is displayed in my list box on my second page. BUT i then need to pass 'TableName' along to my third page with what was selected in the second list box.
understand?
help please.........
 
you can create a hidden form field on your second page which would hold the value of the first listbox

something like this (for page2)
Code:
<FORM ACTION=&quot;page3.asp&quot; METHOD=POST>
<INPUT TYPE=&quot;HIDDEN&quot; VALUE=&quot;<%=Request.Form(&quot;1stListBoxValue&quot;)%>&quot;></INPUT><BR>
<SELECT NAME=&quot;your2ndListBoxName&quot;>
<OPTION etc...


...rest of form bits
</FORM>
Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
I have tryed this but when I submit the form I can only retrieve the the list box value from the second page (yourSecondListBoxName) and not !st listboxValue, any idea why???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top