[英]Call page load event on browser's back button press
I've written a function on page_load event of aspx page. 我已经在aspx页面的page_load事件上编写了一个函数。 Problem i'm facing is the function doesn't get call when browser's back button is pressed, or you can say page_load event is not fired. 我面临的问题是,当按下浏览器的后退按钮时,该函数无法调用,或者可以说未触发page_load事件。 I want to call this function whenever user press browser's back button. 我想在用户按下浏览器的后退按钮时调用此函数。 I've tried 我试过了
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
but it didn't worked. 但是没有用。 Please help, thanks 请帮忙,谢谢
Set postback=true to controls. 将postback = true设置为控件。 After fetching the data, clear the controls text. 提取数据后,清除控件文本。 then proceed to next page. 然后进入下一页。 When user clicks "Back" button, the controls will be clear. 当用户单击“返回”按钮时,控件将被清除。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.