Passing value from page to page

V

viktor

Hi ,
I have a small problem.How can I pass value from form thru a few pages. I
try with hidden field but my second page just validate and redirect to other
one and when I use Request.Form("field") it's nothing coming back.
Any help please.
thanks
 
R

Ray Costanzo [MVP]

Hidden inputs should work if you're submitting a form. Can you post some
example code/html snippets of what is not working?

Ray at work
 
A

Adrienne Boswell

Hi ,
I have a small problem.How can I pass value from form thru a few
pages. I try with hidden field but my second page just validate and
redirect to other one and when I use Request.Form("field") it's
nothing coming back. Any help please.
thanks

You can use hidden input, but make sure that you always pass the
information on. If you are doing a response.redirect, then you have to
include the information in a querystring, and use request.querystring to
retrieve the values.

For example:

<%
'This passes everything in the request.form collection to a querystring.
Redirect = "redirect.asp?"
For ix = 1 to Request.Form.Count
field = Request.Form.Key(ix)
InputValue = Request.Form.Item(ix)
redirect = redirect & field & "=" & inputvalue & "&amp;"
Next
response.redirect redirect
%>

If it's a small amount of data, you could probably use the session object,
but, if the user is not accepting cookies, you're SOL.
 
V

viktor

thanks works fine
Adrienne Boswell said:
You can use hidden input, but make sure that you always pass the
information on. If you are doing a response.redirect, then you have to
include the information in a querystring, and use request.querystring to
retrieve the values.

For example:

<%
'This passes everything in the request.form collection to a querystring.
Redirect = "redirect.asp?"
For ix = 1 to Request.Form.Count
field = Request.Form.Key(ix)
InputValue = Request.Form.Item(ix)
redirect = redirect & field & "=" & inputvalue & "&amp;"
Next
response.redirect redirect
%>

If it's a small amount of data, you could probably use the session object,
but, if the user is not accepting cookies, you're SOL.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,161
Messages
2,570,892
Members
47,431
Latest member
ElyseG3173

Latest Threads

Top