473,405 Members | 2,444 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Browser Back Button

How are people handling the browser back button on database driven web apps
built using ASP.NET??

We keep state in Session and the back button is causing us lots of head
aches!

Is this just a situation where we should look harder at the way we use
Session State or are their tricks and/or tips on this?

TIA
George
Nov 18 '05 #1
10 1681
There is only one easy solution that I know of, and it's not practical in
every situation:
If you open a new browser window it will have no history, thus the back
button will be disabled.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"DotNetGruven" <ms********@javagruven.com> wrote in message
news:uE**************@tk2msftngp13.phx.gbl...
How are people handling the browser back button on database driven web
apps built using ASP.NET??

We keep state in Session and the back button is causing us lots of head
aches!

Is this just a situation where we should look harder at the way we use
Session State or are their tricks and/or tips on this?

TIA
George

Nov 18 '05 #2
The functionality of the Back button is not controllable. It is part of the
client. The best you can do is expire your page content, but there is
nothing you can do to disable the back button.
"DotNetGruven" <ms********@javagruven.com> wrote in message
news:uE**************@tk2msftngp13.phx.gbl...
How are people handling the browser back button on database driven web
apps built using ASP.NET??

We keep state in Session and the back button is causing us lots of head
aches!

Is this just a situation where we should look harder at the way we use
Session State or are their tricks and/or tips on this?

TIA
George

Nov 18 '05 #3
I'd look hard at the design. What are the headaches? If you do need to
control where "back" takes them, you can look at the js function
location.replace(). Or, you might set a session variable so you can know not
to execute a submit the second time around. Hard to know without more detail.

Bill

"DotNetGruven" wrote:
How are people handling the browser back button on database driven web apps
built using ASP.NET??

We keep state in Session and the back button is causing us lots of head
aches!

Is this just a situation where we should look harder at the way we use
Session State or are their tricks and/or tips on this?

TIA
George

Nov 18 '05 #4
Well u can disable it with Jscript by doing:-
javascript:window.history.forward(1);

"DotNetGruven" wrote:
How are people handling the browser back button on database driven web apps
built using ASP.NET??

We keep state in Session and the back button is causing us lots of head
aches!

Is this just a situation where we should look harder at the way we use
Session State or are their tricks and/or tips on this?

TIA
George

Nov 18 '05 #5
That doesn't disable the Back button. In fact, it will cause problems if
the user has already hit the back button prior to arriving at the page in
question.

"Patrick.O.Ige" <Pa*********@discussions.microsoft.com> wrote in message
news:FD**********************************@microsof t.com...
Well u can disable it with Jscript by doing:-
javascript:window.history.forward(1);

"DotNetGruven" wrote:
How are people handling the browser back button on database driven web
apps
built using ASP.NET??

We keep state in Session and the back button is causing us lots of head
aches!

Is this just a situation where we should look harder at the way we use
Session State or are their tricks and/or tips on this?

TIA
George

Nov 18 '05 #6
Hi Scott,
Yeah thanks alot for the advice.
But that was my quick solution.
Do you have any good way to do that?
Patrick

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #7
Response.Expires = date in the past

"naija naija" <pa*********@crazyjohns.com.au> wrote in message
news:Ol**************@TK2MSFTNGP12.phx.gbl...
Hi Scott,
Yeah thanks alot for the advice.
But that was my quick solution.
Do you have any good way to do that?
Patrick

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #8
Hi Scott,
Can you explain in detail how it works?
thx
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #9
By setting this value on a web page, you are indicating to the server that
the page content is no longer valid. The page content will expire
immediately. You can't disable the Back button, but if the page content has
expired, when the user does hit the back button, the client will display
"Page Expired" instead of the page.

"naija naija" <pa*********@crazyjohns.com.au> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Scott,
Can you explain in detail how it works?
thx
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #10
thx Scott ur too cool:)
Nice Idea!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Ralph Freshour | last post by:
Is it possible to inhibit the browser Back/Fwd buttons via PHP? Thanks...
21
by: Tony Marston | last post by:
If the use of the browser's BACK button is interfering with the operation of your web application then take a look at this article entitle "Back Button Blues" ...
7
by: zdrakec | last post by:
Hello all: I note in my application, that when I use Server.Transfer("somepage.aspx"), when the new page is loaded, and I click the Back button on the browser, that the previous page, when it...
3
by: Shimon Sim | last post by:
Hi Is it possible to make sure that the page doesn't show in browser history and won't effect Back button. The problem is that every postback shows as another entry for "Back" button and user...
2
by: Liming | last post by:
Hi, I have a multiview (with 10 views inside). Now on View2, I ask the user to uplaod a file and click Save to go to View3 and once they get to view3? If the user hits my "previous" button,...
5
by: ns21 | last post by:
How can the browser back button be disabled If the form is submitting information to other pages or submitting to itself or using redirections. I tried the tweaks like history.forward(1) in each...
15
by: tshad | last post by:
I was looking for a way to handle refreshes (user pressed refresh button) and found a piece of code to check if a Web page was refreshed but I can't get it to work. The code is:...
6
by: hemant.singh | last post by:
Hi all, I am trying to get a way by which I'll know exactly when user goes out of my site by clicking on close button in browser, So that w/e user click close button in browser, I can send a...
0
by: toeffetommy | last post by:
Hello, I need a piece of functionality developed for our Website and I need some technical advice on how get there. Essentially, what I want to develop is a browser-within-browser...
1
by: Randy | last post by:
I have an application with a datagrid and a button to export the grid to excel. For the most part this is working fine. Here's the export method: Private Sub btnExcel_Click(ByVal sender As...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.