How do I POST data to a remote URL in Classic ASP?

后端 未结 8 782
走了就别回头了
走了就别回头了 2020-12-08 08:06

I need to POST data to a url in the middle of a script.

  1. User fills out form:
  2. Form submits to process.asp: I need to PO
8条回答
  •  無奈伤痛
    2020-12-08 08:47

    OK all the answers were very complicated and I know you already selected a solution - but I feel like the simple Server.Transfer() command could have done exactly what you need.

    At the end of your script instead of Response.Redirect(url) to the new page - just do a Server.Transfer(url) and it will pass your entire Request collection across to the next page.

    Read about it here (support.microsoft.com).

    There are some catches (i.e. it keeps the same URL on the browser so it can play tricks with the back button and such) but otherwise it's pretty simple.

提交回复
热议问题