Friday, August 9, 2019

How to prevent back button of browser in c# after logout session


Add below code in your page load function in c# code.

 HttpContext.Current.Response.AddHeader("Cache-Control", "no-cache, no-store, must-revalidate");
 HttpContext.Current.Response.AddHeader("Pragma", "no-cache");
 HttpContext.Current.Response.AddHeader("Expires", "0");

Featured Post

What is JavaScript? What is the role of JavaScript engine?

  The JavaScript is a Programming language that is used for converting static web pages to interactive and dynamic web pages. A JavaScript e...