ASP.NET: How to redirect, prefilling form data?

前端 未结 3 1803
孤城傲影
孤城傲影 2020-12-21 17:47

i want a handler to redirect to a web-forms page, pre-filling in the values of some controls on the form.

i tried setting my current Request.Form da

3条回答
  •  無奈伤痛
    2020-12-21 18:37

    Another approach that hasn't been mentioned yet is using Server.Transfer makes it possible to use the Page.PreviousPage property, allowing access to the controls on the page that transferred control.

    As jrista mentioned though, using Transfer doesn't update the URL shown to the user, which may or may not be an issue. For example, a user can't precisely bookmark a page they got transferred to since the URL will be that of the original transferring page.

提交回复
热议问题