Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Forwarding the Request.Form collection

Reply
Thread Tools

Forwarding the Request.Form collection

 
 
Agoston Bejo
Guest
Posts: n/a
 
      11-22-2004
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.




 
Reply With Quote
 
 
 
 
André Nobre
Guest
Posts: n/a
 
      11-22-2004
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.
>
>
>
>
>

 
Reply With Quote
 
 
 
 
Agoston Bejo
Guest
Posts: n/a
 
      11-22-2004

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 http://www.velocityreviews.com/forums/(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
> >
> >
> >
> >
> >



 
Reply With Quote
 
Jeff Cochran
Guest
Posts: n/a
 
      11-22-2004
On Mon, 22 Nov 2004 11:49:33 +0100, "Agoston Bejo" <(E-Mail Removed)>
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
 
Reply With Quote
 
Michael D. Kersey
Guest
Posts: n/a
 
      11-22-2004
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.
 
Reply With Quote
 
Agoston Bejo
Guest
Posts: n/a
 
      11-23-2004
Not exactly what I thought about, but works fine just the same.

"Michael D. Kersey" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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.



 
Reply With Quote
 
Johan Ramestam
Guest
Posts: n/a
 
      11-30-2004
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" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> 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 (E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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.
> > >
> > >
> > >
> > >
> > >

 
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
forwarding Args&&... vs forwarding Args... Andrew Tomazos C++ 5 01-05-2012 11:15 PM
create collection of collection Hemant ASP .Net 1 10-22-2009 03:04 PM
Collection problems (create Collection object, add data to collection, bind collection to datagrid) yvind Isaksen ASP .Net 1 05-18-2007 09:24 AM
Sorting the Collection(java.util.Collection) of Elements Pradeep Java 2 01-24-2007 02:33 PM
STL - an algorithm for finding a collection within a collection? Dylan C++ 5 03-22-2005 01:31 AM



Advertisments