Re: Passing value from page to page

From: Adrienne Boswell (arbpen2003_at_sbcglobal.net)
Date: 12/07/04


Date: Tue, 07 Dec 2004 17:21:22 GMT

Gazing into my crystal ball I observed "viktor"
<serguienkov@hotmail.com> writing in
news:OfFI9zH3EHA.1124@tk2msftngp13.phx.gbl:

> 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.

-- 
Adrienne Boswell
Please respond to the Group so others can share 


Relevant Pages

  • Re: Logged in - Session timeout
    ... You have that info in a session, and then simply send them to: ... take any querystring info with it that you may need.... ... Now the users times out and you redirect them to your login page, ...
    (microsoft.public.inetserver.asp.general)
  • Re: Post Data to PayPal from Code Behind
    ... I had thought about using the querystring to pass the ... use the my website to their website and back to mine, ... query string and redirect the browser to the url. ... radio button list) that are on the checkout.ascx file which the iframe ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Logged in - Session timeout
    ... "Targa" wrote ... ... take any querystring info with it that you may need.... ... Now the users times out and you redirect them to your login page, ...
    (microsoft.public.inetserver.asp.general)
  • Re: Setting the outgoing querystring
    ... I understand that using a hidden field is a common way ... to persist information, but here is a more detailed description of my ... QueryString) to see if I should display a specified search or the default ... postback. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: HELP! - I need to setup a temporary IIS redirect while I fix SQL Injection vulnerabilities o
    ... Can I go a global redirect like this in IIS to prevent the request ... but it will NOT scan the Querystring. ... All it takes is a few encodings/permutations and ...
    (microsoft.public.inetserver.iis.security)