Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Browser Back Button

Reply
Thread Tools

Browser Back Button

 
 
DotNetGruven
Guest
Posts: n/a
 
      11-09-2004
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


 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      11-09-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
 
Scott M.
Guest
Posts: n/a
 
      11-09-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
=?Utf-8?B?QmlsbCBCb3Jn?=
Guest
Posts: n/a
 
      11-09-2004
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
>
>
>

 
Reply With Quote
 
=?Utf-8?B?UGF0cmljay5PLklnZQ==?=
Guest
Posts: n/a
 
      11-09-2004
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
>
>
>

 
Reply With Quote
 
Scott M.
Guest
Posts: n/a
 
      11-10-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>>
>>
>>



 
Reply With Quote
 
naija naija
Guest
Posts: n/a
 
      11-10-2004
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!
 
Reply With Quote
 
Scott M.
Guest
Posts: n/a
 
      11-10-2004
Response.Expires = date in the past

"naija naija" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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!



 
Reply With Quote
 
naija naija
Guest
Posts: n/a
 
      11-11-2004
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!
 
Reply With Quote
 
Scott M.
Guest
Posts: n/a
 
      11-11-2004
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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!



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
After gmail logs out, cannot go back through browser back button Author ASP .Net 6 01-22-2009 03:24 PM
Internet Explorer Browser Extension: Switching from Live to Development and back again with a browser extension or BHO--how to create it? Danny Javascript 11 06-27-2007 01:50 PM
Firefox back button takes me back 2 pages. Useful Info Javascript 0 06-02-2007 11:21 PM
disable the back button provide the users with my own button to go back. sylvia sil ASP .Net 1 12-29-2004 04:41 PM
Back button on the browser problem shimonsim@talamus.com ASP .Net 3 06-29-2003 12:26 PM



Advertisments