468,771 Members | 1,464 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,771 developers. It's quick & easy.

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 1528
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Ralph Freshour | last post: by
7 posts views Thread by zdrakec | last post: by
3 posts views Thread by Shimon Sim | last post: by
2 posts views Thread by Liming | last post: by
5 posts views Thread by ns21 | last post: by
15 posts views Thread by tshad | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.