Passing POST form data through Response.Redirect

Results 1 to 3 of 3

Thread: Passing POST form data through Response.Redirect

  1. #1
    Join Date
    Dec 1969

    Default Passing POST form data through Response.Redirect

    Is it possible? It&#039s quite simple to pass form data using the GET method and Response.Redirect, but I&#039m trying to avoid having lots of cumbersome info in the URL and going POST only. I have a ton of forms, and to keep the ability of certain forms to have multiple possibilities of acces without using session stuff, I want to be able to pass POST info on the fly. Any help is appreciated.

  2. #2
    BalletChick Guest

    Default RE: Passing POST form data through Response.Redire

    I am a bit confused by what you are asking. If you mean to pass values to a third url (e.g. first the form with POST, then the script that processes or validates the data, the a THIRD page to which is "redirected") then yes, it&#039s straightforward. When you do the response.redirect from the second page, just append all of the data/value pairs to the URL, separated by ampersands (&). I would not recommed this, but it may help answer your question.<BR><BR>However, if you are asking how to do a POST, simply use the POST method in your &#060;FORM...&#062; tag. When you hit the submit button, you POST your data. There would not be any RESPONSE.REDIRECT involved at all.<BR><BR>But... I admit I am confused by your question. If this response has not helped, could you clarify what you are asking about, or what exactly you are trying to do?<BR><BR>

  3. #3
    Scott Jones Guest

    Default RE: Passing POST form data through Response.Redire

    No, I&#039m understanding it that he wishes to pass information from a form that has been POSTED to a third page, but does not want to use the URL bar, because it is cumbersome.<BR><BR>I&#039d investigate one of several methods ... whatever suits your preference:<BR><BR>Set a variabale to Request.Form ... pass this variable to the next page as:<BR><BR>1. Session Variable (and then destroy it when you no longer need it on the next page).<BR>2. URL bar .. simply add the variable to the redirect page in the appropriate manner. You should find each form element is correctly formatted for use in the URL bar.<BR>3. Depending on what the second page does and if anything is visable on it or not, post the contents of the form into a hidden form field and then POST this second form using Javascript onload.<BR>4. Modify your page usage so that one page performs the steps in TWO and THREE ... or even have one page perform all three steps (1, 2 and 3).<BR>5. You could utilize a temporary database/file to hold form information and simply pass an id number to the third page, which could then retrieve the data.<BR><BR>Hope something here gives you an idea or two!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts