Response.Redirect with POST instead of Get?

后端 未结 14 945
离开以前
离开以前 2020-11-22 04:04

We have the requirement to take a form submission and save some data, then redirect the user to a page offsite, but in redirecting, we need to \"submit\" a form with POST, n

相关标签:
14条回答
  • 2020-11-22 04:42

    I suggest building an HttpWebRequest to programmatically execute your POST and then redirect after reading the Response if applicable.

    0 讨论(0)
  • 2020-11-22 04:43

    Something new in ASP.Net 3.5 is this "PostBackUrl" property of ASP buttons. You can set it to the address of the page you want to post directly to, and when that button is clicked, instead of posting back to the same page like normal, it instead posts to the page you've indicated. Handy. Be sure UseSubmitBehavior is also set to TRUE.

    0 讨论(0)
提交回复
热议问题