问题描述
当我刷新aspx页面时会得到
---------------------------
Microsoft Internet Explorer
---------------------------
如果不重新发送信息,则无法刷新页面.
单击重试"再次发送信息,
或单击取消"返回到您要查看的页面.
---------------------------
重试取消
---------------------------
像此消息框一样,我如何通过代码发送取消消息或如何避免此消息框
while i''m refreshing aspx page will get
---------------------------
Microsoft Internet Explorer
---------------------------
The page cannot be refreshed without resending the information.
Click Retry to send the information again,
or click Cancel to return to the page that you were trying to view.
---------------------------
Retry Cancel
---------------------------
like this message box how i can send cancel via code or how i can avoid this message box
推荐答案
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1));
Response.Cache.SetNoStore();
当您单击刷新按钮时,浏览器将查找缓存的页面,但是如果您有意避免缓存,则它将从服务器获取副本.
如果您使用NoCache逻辑,则删除该代码可能会对您有所帮助.
when you hit refresh button browser looks for cached page, but if you intentionally avoid caching, then it will take the copy from server.
if you used NoCache logic, removing that code may help you.
这篇关于在不重新发送信息的情况下无法刷新页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!