Don't allow "back" button in usercontrol

  • Thread starter Thread starter Ryan Moore
  • Start date Start date
R

Ryan Moore

I have a .ascx file that I want to make refresh the page if the user hit it
by clicking the "back" button on the browser... how can I accomplish this?

Thanks
 
Hi,


you should use SetCacheability and set it to noCache so the page wont be
cached on the client side :

// userControl Page_Load event
private void Page_Load(object sender, System.EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
...
}
Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
 
Back
Top