How do I use the “Post/Redirect/Get” a.k.a. “Redirect after Post” with asp.net

醉酒当歌 提交于 2019-11-30 10:13:36

I have a feeling there is a deeper problem I'm not getting but here goes. In your postback event:

// the post handling logic, e.g. the click event code
Response.Redirect(Request.RawUrl);

Use Server.Transfer method.

The Server.Transfer method has a second parameter—"preserveForm". If you set this to True, using a statement such as Server.Transfer("WebForm2.aspx", True), the existing query string and any form variables will still be available to the page you are transferring to.

http://www.developer.com/net/asp/article.php/3299641

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!