Response.Redirect with POST instead of Get?

后端 未结 14 946
离开以前
离开以前 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: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.

提交回复
热议问题