Click here to Skip to main content
14,980,591 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Disabled Browser Back button in asp .net


What I have tried:

Hi,

I have two form "Default1.aspx" & "Default2.aspx".
Default1.aspx form has not site mater and Default2.aspx has a site mater.
So in Default1.aspx form one button "Default2" and in click event i have use below code:
Response.Redirect("Default2.aspx",false);
So my question is i am clicking on button then goes to Default2.aspx and in browser back button is enabled.
So how can i disabled this browser back.
Please help me.

Thanks in Advance.
Posted
Updated 21-Feb-18 19:35pm

1 solution

That should not be done, unless you have a very very strong reason. Think about the users of your application/website.

Anyway, there are definitely ways to do that. Please check following links-
asp.net - Disabling backbutton of browser in C# - Stack Overflow[^]
Disable Browser Back Button after LogOut in ASP.Net using JavaScript[^]
Disable Browser Back Button
[^]

Please let me know if you are finding it difficult to implement further.

Hope, it helps :)
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900