Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Forward Posted Form Data

Reply
Thread Tools

Forward Posted Form Data

 
 
Mark Watkins
Guest
Posts: n/a
 
      01-05-2004
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.


 
Reply With Quote
 
 
 
 
Roland Hall
Guest
Posts: n/a
 
      01-05-2004
"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


 
Reply With Quote
 
 
 
 
Alex G
Guest
Posts: n/a
 
      01-05-2004
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" <(E-Mail Removed)> wrote in message news:<#(E-Mail Removed)>...
> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read data from enctype="multipart/form-data" form Kevin DeValck Ruby 1 05-17-2011 06:14 PM
download an image POSTed By multipart form-data Umeshnath ASP .Net Web Services 0 08-11-2009 05:36 PM
Probelm to post XML data in a loop. First time XML is posted, second time data is getting truncated. Please help. vamsi.aluru@gmail.com Perl Misc 7 02-14-2006 12:09 PM
Cannot access POSTed form data Mark Perl 1 07-23-2004 05:20 PM
Re-forward declaration of types which were already forward declared qazmlp C++ 1 02-15-2004 07:00 PM



Advertisments