Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Disable 'Back' button in the browser menu

Author  Topic 

ourspt
Starting Member

33 Posts

Posted - 2005-05-20 : 10:56:32
Hi,

We are working on a .NET application (ASP.NET/VB.NET). We need to suppress (disable) the 'Back' button in the menu of the browser. What is the way to do that?

Thanks in advance
oursmp

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2005-05-20 : 11:45:20
Don't. This is a nasty, mean, ugly, horrible concept that far too many people have become enamored with the idea of forcing a user to do things their way. This is totally anathema to the Web experience, not to mention that when I run across sites that attempt to do this it makes my blood boil.

And besides that, there are many different ways of doing "back". Are you going to attempt to disable all of them?

- Back button on the Toolbar
- Right-click, choose Back from the shortcut menu
- Alt+Left arrow key

Figure out a way to make your application work even if the user goes Back.

---------------------------
EmeraldCityDomains.com
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2005-05-26 : 08:03:31
Am still quite new to .net
however for some pages of our ASP site, i just disallow cache with this. dont know how to do this in .net yet

<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader "Pragma", "no-cache" %>
<% Response.Expires = -1 %>

that way, it refreshes the page, instead of going back
Afrika
Go to Top of Page
   

- Advertisement -