如何在asp.net中使用"发布/重定向/获取"又名"后发布后重定向"

min*_*nty 4 asp.net post redirect-after-post post-redirect-get

在asp.net中执行某些操作后执行刷新似乎会使它们再次发生,即使该操作没有意义(想想双删除).处理这种情况的Web方式是在帖子之后重定向以获得可以刷新的页面的干净版本,而无需将操作重新发布到Web服务器.我怎么能用ASP.NET做到这一点

Cri*_*rdo 5

我觉得有一个更深层次的问题,我没有得到,但这里有.在你的回发活动中:

// the post handling logic, e.g. the click event code
Response.Redirect(Request.RawUrl);
Run Code Online (Sandbox Code Playgroud)