By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,559 Members | 1,154 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,559 IT Pros & Developers. It's quick & easy.

Forward Posted Form Data

P: n/a
suppose I have the following:

-----------BEGIN page1.asp----------
<form method="post" action="page2.asp">
<select name="someData" size="1" class="smallbutton">
<option value="1">Whatever</option>
</select>
'and a submit button
</form>
----------END page1.asp--------------

-----------BEGIN page2.asp----------
aVariable = Request.Form("someData")

<form method="post" action="page3.asp">
<select name="someOtheJjunk" size="1" class="smallbutton">
<option value="1">Whatever</option>
</select>
'and a submit button
</form>
----------END page2.asp--------------

Is there any kind of way to forward "someData", whch was
posted into page 2, to page 3 without making it more form data in page2. I
pretty much want to just be able to do something simple in page 3 like this:

-----------BEGIN page3.asp----------
anotherVariable = Request.Form("someData")
----------END page3.asp--------------
Thanks in advance.
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Mark Watkins" wrote:
: suppose I have the following:
:
: -----------BEGIN page1.asp----------
: <form method="post" action="page2.asp">
: <select name="someData" size="1" class="smallbutton">
: <option value="1">Whatever</option>
: </select>
: 'and a submit button
: </form>
: ----------END page1.asp--------------
:
: -----------BEGIN page2.asp----------
: aVariable = Request.Form("someData")
:
: <form method="post" action="page3.asp">
: <select name="someOtheJjunk" size="1" class="smallbutton">
: <option value="1">Whatever</option>
: </select>
: 'and a submit button
: </form>
: ----------END page2.asp--------------
:
: Is there any kind of way to forward "someData", whch was
: posted into page 2, to page 3 without making it more form data in page2.
I
: pretty much want to just be able to do something simple in page 3 like
this:
:
: -----------BEGIN page3.asp----------
: anotherVariable = Request.Form("someData")
: ----------END page3.asp--------------

You cannot retrieve a variable's value from a page header by using
Request.Form any other way than METHOD=POST from a form where ACTION=
targets the page you're retrieving. So, I see two possibilities without
using cookies, files, etc.

Hidden field inside a form.

page2.asp
.... inside form ...
<input id="someData" name="someData" type=hidden value="<%=aVariable%>" />

OR

You could use a session variable.

page2.asp
Session("aVariable") = Request.Form("someData")

page3.asp
anotherVariable = Session("aVariable")

--
Roland

This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.
-Technet Knowledge Base-
http://support.microsoft.com/default...&ln=EN-US&FR=0
-Technet Script Center-
http://www.microsoft.com/technet/tre...er/default.asp
-MSDN Library-
http://msdn.microsoft.com/library/default.asp
Jul 19 '05 #2

P: n/a
If you want to use Request.Form in page 3 then you will have to
forward it using form variables. If you don't need to use Request.Form
you could use Session Variables.

"Mark Watkins" <ma*********@yahoo.com> wrote in message news:<#K**************@TK2MSFTNGP12.phx.gbl>...
suppose I have the following:

-----------BEGIN page1.asp----------
<form method="post" action="page2.asp">
<select name="someData" size="1" class="smallbutton">
<option value="1">Whatever</option>
</select>
'and a submit button
</form>
----------END page1.asp--------------

-----------BEGIN page2.asp----------
aVariable = Request.Form("someData")

<form method="post" action="page3.asp">
<select name="someOtheJjunk" size="1" class="smallbutton">
<option value="1">Whatever</option>
</select>
'and a submit button
</form>
----------END page2.asp--------------

Is there any kind of way to forward "someData", whch was
posted into page 2, to page 3 without making it more form data in page2. I
pretty much want to just be able to do something simple in page 3 like this:

-----------BEGIN page3.asp----------
anotherVariable = Request.Form("someData")
----------END page3.asp--------------
Thanks in advance.

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.