Protecting ASP.Net Page From Back button press

You can make your ASP.Net pages protected from browser back button press, while your data is not yet saved or to ensure the security of transactional data, eg: online banking, cms

You have to place the code inside ‘Page_Load’


protected void Page_Load(object sender, EventArgs e)
//Empty Browser Cache on Back button Press
Response.AppendHeader(“Pragma”, “no-cache”);

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s