在浏览器刷新preventing表单重新提交不失视图状态 [英] Preventing webform resubmission on browser refresh without losing viewstate
问题描述
有一个不错的优雅的方式,从当用户从他们的浏览器请求重新提交刷新表单数据停止.aspx页?
Is there a nice elegant way to stop an .aspx page from resubmitting form data if the user requests a refresh from their browser?
在理想情况下不失视图状态。
Ideally without losing the viewstate.
编辑:作为我来说,最优雅的解决方案竟然是包装相关控制在一个asp.net阿贾克斯的UpdatePanel。钽大家。
The most elegant solution for me turned out to be wrapping the relevant controls in an asp.net ajax UpdatePanel. Ta everyone.
推荐答案
有没有优雅的方式,但也有选择。正如在其他的答案中的一个说你可以做一个HTTP重定向响应。另一种解决方案是通过诸如Ajax或通过iframe提交。
There is no elegant way, but there are options. As stated in one of the other answers you can do a HTTP redirect response. Another solution is submitting through means such as Ajax, or through an iframe.
这篇关于在浏览器刷新preventing表单重新提交不失视图状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!