Postback on browser back button click

Posted by sarithasi-16371 under ASP.NET on 9/18/2012 | Points: 10 | Views : 1839 | Status : [Member] | Replies : 1
Hi,
I have to reload the page on every browser back button click. I have tried to clear the cache by using the following code:
Response.Buffer = true;
Response.CacheControl = "no-cache";
Response.AddHeader("Pragma", "no-cache");
Response.AppendHeader("Cache-Control", "no-store");
Response.Expires = -1;
but that also not working for me.

Can you suggest some ways to resolve this issue.
Thanks,
Saritha.




Responses

Posted by: Vikash on: 9/18/2012 [Member] Starter | Points: 25

Up
0
Down
I hope it will work......

<script type = "text/javascript" >
function disableBackButton() {
window.history.forward();
}
setTimeout("disableBackButton()", 0);
</script>


please mark as answer if got helpful.........

Regards,
Vikash Pathak

sarithasi-16371, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response