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(pst rURL)
Dim strKey
Response.Write( "<form method=""post"" action=""" & pstrURL & """
name=""forwardF orm"">")
For Each strKey In Request.Form
Response.Write( "<input type=""hidden"" name=""" & strKey & """
value=""" & Request.Form(st rKey) & """>")
Next
Response.Write( "</form>")
Response.Write( "<script language=""java script"">")
Response.Write( "if (document.forwa rdForm)
document.forwar dForm.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******* *******@TK2MSFT NGP14.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***@discussio ns.microsoft.co m> wrote in message
news:A9******** *************** ***********@mic rosoft.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:
DoSomeAdministr ation()
Response.Redire ct "x3.asp?" & Request.Form
x3.asp: further processsing of data
This scenario works for a certain amount of data, but passing data in
Request.QuerySt ring 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.