Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Response.Redirect with Form collection maintained to a second page

Status
Not open for further replies.

Beren1h

Technical User
Jul 19, 2001
104
US
I am trying to create a form that when submited directs the user to one of five other forms based on their input.

What I doing on the user input form

<FORM method=post action=redirect.asp>

then on redirect.asp they are sent to another page with the Response.Redirect method

The problem I am having is that this last page the Form collection from the original input form is gone and I still need that information.

How do I get the user input information from the first page, past the second page, and on to the thrid page?

(Or is there a better approach?)

Thanks...
 
How about creating session variables for each form entry
i.e.
session(&quot;first&quot;) = request.form(&quot;first&quot;)
session(&quot;last&quot;) = request.form(&quot;last&quot;)
session(&quot;address&quot;) = request.form(&quot;address&quot;)
session(&quot;city&quot;) = request.form(&quot;city&quot;)
session(&quot;state&quot;) = request.form(&quot;state&quot;)
session(&quot;zip&quot;) = request.form(&quot;zip&quot;)

then simply calling the session's when you need them. Double check the way session are create tho, I'm not 100% sure.
 
If you're using ASP 3.0, use Server.transfer instead of response.redirect. Server.Transfer retains all of the form data...

ex:
response.redirect &quot;abc.asp&quot;
is now:
server.transfer &quot;abc.asp&quot; leo

------------
Leo Mendoza
lmendoza@garbersoft.net
 
Leo,
That was my first thought, but our server runs IIS 4.0 which I think means we have ASP 2.0 (I couldn't get the transfer method working anyhow...)

CDN,
I don't know much about the session/application variables, but doesn't an application's global.asa file need to reside in a virtual directory defined by the server? Or rather the people who maintain our server would have to define which directory our global.asa file would go in?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top