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

Forwarding the Request.Form collection

P: n/a
Hi.

x1.asp:
<form method="post" action="x2.asp"> .... </form>

x2.asp:
DoSomeAdministration()
Response.Redirect "x3.asp?" & Request.Form

x3.asp: further processsing of data
This scenario works for a certain amount of data, but passing data in
Request.QueryString has its limits.
Is there any other way so that x3.asp can retrieve the data posted in
x1.asp? I could put the textual representation of Request.Form into a
session variable, but it would be much easier if I could pass on
Request.Form so that x3.asp would be able to access it the same way as it
could if x1.asp posted directly to x3.asp.


Jul 22 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
You can use hidden fields to do this, redirecting from x2 to x3 with java
script.

"Agoston Bejo" wrote:
Hi.

x1.asp:
<form method="post" action="x2.asp"> .... </form>

x2.asp:
DoSomeAdministration()
Response.Redirect "x3.asp?" & Request.Form

x3.asp: further processsing of data
This scenario works for a certain amount of data, but passing data in
Request.QueryString has its limits.
Is there any other way so that x3.asp can retrieve the data posted in
x1.asp? I could put the textual representation of Request.Form into a
session variable, but it would be much easier if I could pass on
Request.Form so that x3.asp would be able to access it the same way as it
could if x1.asp posted directly to x3.asp.


Jul 22 '05 #2

P: n/a

The main point is not having to know what exactly is in Request.Form AND not
having to create forms for a simple redirect. (This latter could be
generated based on Request.Form but then I would need a javascript that
redirects a page etc. - too much work!)

"André Nobre" <Andr No***@discussions.microsoft.com> wrote in message
news:A9**********************************@microsof t.com...
You can use hidden fields to do this, redirecting from x2 to x3 with java
script.

"Agoston Bejo" wrote:
Hi.

x1.asp:
<form method="post" action="x2.asp"> .... </form>

x2.asp:
DoSomeAdministration()
Response.Redirect "x3.asp?" & Request.Form

x3.asp: further processsing of data
This scenario works for a certain amount of data, but passing data in
Request.QueryString has its limits.
Is there any other way so that x3.asp can retrieve the data posted in
x1.asp? I could put the textual representation of Request.Form into a
session variable, but it would be much easier if I could pass on
Request.Form so that x3.asp would be able to access it the same way as it could if x1.asp posted directly to x3.asp.


Jul 22 '05 #3

P: n/a
On Mon, 22 Nov 2004 11:49:33 +0100, "Agoston Bejo" <gu***@freemail.hu>
wrote:
Hi.

x1.asp:
<form method="post" action="x2.asp"> .... </form>

x2.asp:
DoSomeAdministration()
Response.Redirect "x3.asp?" & Request.Form

x3.asp: further processsing of data
This scenario works for a certain amount of data, but passing data in
Request.QueryString has its limits.
Is there any other way so that x3.asp can retrieve the data posted in
x1.asp? I could put the textual representation of Request.Form into a
session variable, but it would be much easier if I could pass on
Request.Form so that x3.asp would be able to access it the same way as it
could if x1.asp posted directly to x3.asp.


Or do your processing in x2.asp without needing to move to x3.asp. Or
even post back to x1.asp, even displaying and repopulating the form if
need be.

Jeff
Jul 22 '05 #4

P: n/a
Agoston Bejo wrote:
Hi.

x1.asp:
<form method="post" action="x2.asp"> .... </form>

x2.asp:
DoSomeAdministration()
Response.Redirect "x3.asp?" & Request.Form

x3.asp: further processsing of data

This scenario works for a certain amount of data, but passing data in
Request.QueryString has its limits.
Is there any other way so that x3.asp can retrieve the data posted in
x1.asp? I could put the textual representation of Request.Form into a
session variable, but it would be much easier if I could pass on
Request.Form so that x3.asp would be able to access it the same way as it
could if x1.asp posted directly to x3.asp.


Server.Execute() may be what you want.
Jul 22 '05 #5

P: n/a
Not exactly what I thought about, but works fine just the same.

"Michael D. Kersey" <md******@hal-pc.org> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Agoston Bejo wrote:
Hi.

x1.asp:
<form method="post" action="x2.asp"> .... </form>

x2.asp:
DoSomeAdministration()
Response.Redirect "x3.asp?" & Request.Form

x3.asp: further processsing of data

This scenario works for a certain amount of data, but passing data in
Request.QueryString has its limits.
Is there any other way so that x3.asp can retrieve the data posted in
x1.asp? I could put the textual representation of Request.Form into a
session variable, but it would be much easier if I could pass on
Request.Form so that x3.asp would be able to access it the same way as it could if x1.asp posted directly to x3.asp.


Server.Execute() may be what you want.

Jul 22 '05 #6

P: n/a
Well, you could solve this in a pretty generic way, by iterating over
the Request.Form collection, generating a form with corresponding
hidden variables. And in the end, you include a Javascript that simply
submits the form (rather than doing a redirect).

Consider this simple function:

ForwardForm "x3.asp"

Sub ForwardForm(pstrURL)
Dim strKey
Response.Write("<form method=""post"" action=""" & pstrURL & """
name=""forwardForm"">")
For Each strKey In Request.Form
Response.Write("<input type=""hidden"" name=""" & strKey & """
value=""" & Request.Form(strKey) & """>")
Next
Response.Write("</form>")
Response.Write("<script language=""javascript"">")
Response.Write("if (document.forwardForm)
document.forwardForm.submit();")
Response.Write("</script>")
End Sub

Please note that you might need to escape certain characters (").

Regards,
Johan

"Agoston Bejo" <gu***@freemail.hu> wrote in message news:<O0**************@TK2MSFTNGP14.phx.gbl>...
The main point is not having to know what exactly is in Request.Form AND not
having to create forms for a simple redirect. (This latter could be
generated based on Request.Form but then I would need a javascript that
redirects a page etc. - too much work!)

"André Nobre" <Andr No***@discussions.microsoft.com> wrote in message
news:A9**********************************@microsof t.com...
You can use hidden fields to do this, redirecting from x2 to x3 with java
script.

"Agoston Bejo" wrote:
Hi.

x1.asp:
<form method="post" action="x2.asp"> .... </form>

x2.asp:
DoSomeAdministration()
Response.Redirect "x3.asp?" & Request.Form

x3.asp: further processsing of data
This scenario works for a certain amount of data, but passing data in
Request.QueryString has its limits.
Is there any other way so that x3.asp can retrieve the data posted in
x1.asp? I could put the textual representation of Request.Form into a
session variable, but it would be much easier if I could pass on
Request.Form so that x3.asp would be able to access it the same way as it could if x1.asp posted directly to x3.asp.


Jul 22 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.