473,513 Members | 2,576 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

lock-out "Back" button

asp.net 1.1
ie 6

how to lock-out the user from clicking the browser "Back" button ?

Nov 19 '05 #1
11 2671
Not possible.

"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
asp.net 1.1
ie 6

how to lock-out the user from clicking the browser "Back" button ?

Nov 19 '05 #2
Scott M. < No****@NoSpam.com > wrote:
Not possible.
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
asp.net 1.1
ie 6
how to lock-out the user from clicking the browser "Back" button ?


It is possible, with javascript, but you cannot depend on it working (user
can disable js, may not have it, etc.). Google "disable back javascript"
Nov 19 '05 #3
It is NOT possible with ASP.NET and (as you point out) it is not reliable in
client-side code either.

"Jeff Evans" <jwevans1@you_eye_you_see.edu> wrote in message
news:Or**************@tk2msftngp13.phx.gbl...
Scott M. < No****@NoSpam.com > wrote:
Not possible.
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
asp.net 1.1
ie 6
how to lock-out the user from clicking the browser "Back" button ?


It is possible, with javascript, but you cannot depend on it working (user
can disable js, may not have it, etc.). Google "disable back javascript"

Nov 19 '05 #4
Its not possible to do that in asp.net. If your requirement is that user
shouldnt see the cached page by clicking back button, then check out this
faq
http://www.extremeexperts.com/Net/FA...ackButton.aspx

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Scott M." <No****@NoSpam.com> wrote in message
news:u1**************@TK2MSFTNGP11.phx.gbl...
It is NOT possible with ASP.NET and (as you point out) it is not reliable in client-side code either.

"Jeff Evans" <jwevans1@you_eye_you_see.edu> wrote in message
news:Or**************@tk2msftngp13.phx.gbl...
Scott M. < No****@NoSpam.com > wrote:
Not possible.
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
asp.net 1.1
ie 6
how to lock-out the user from clicking the browser "Back" button ?


It is possible, with javascript, but you cannot depend on it working (user can disable js, may not have it, etc.). Google "disable back javascript"


Nov 19 '05 #5
Yeah u could also use javascript..but that WILL not allow the user to
click the back button on the BROWSER!
But if its NOT to see the cached page then Saravana's solution should
WORK
Patrick

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

Nov 19 '05 #6
Hi Saravana.

In regards to "disabling the IE Back button" in my ASP.NET application ...

My objective is to prevent the user from seeing any of the pages previously
visited in my application -- so removing them from the cache sounds like the
correct solution.

I assume with your solution, the "Back" button stays visible on the browser?
What happens if the user clicks it? I'd prefer that the current page remain
shown.
Response.Buffer = True
Response.ExpiresAbsolute = Now().Subtract(New TimeSpan(1, 0, 0, 0))
Response.Expires = 0
Response.CacheControl = "no-cache"

Where to locate the above code? Does it have to be placed in every page?
Such as in the OnPreRender event ?

Or is there a way to implement this technique globally for my entire asp.net
application ?

Thanks.
John.
--------------

you wrote:

"Saravana" <sa******@sct.co.inwrote in message
news:Ml*****************@news.cpqcorp.net...
Its not possible to do that in asp.net. If your requirement is that user
shouldnt see the cached page by clicking back button, then check out this
faq
http://www.extremeexperts.com/Net/FA...ackButton.aspx
--
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com

"Saravana" <sa******@sct.co.in> wrote in message
news:Ml*****************@news.cpqcorp.net...
Its not possible to do that in asp.net. If your requirement is that user
shouldnt see the cached page by clicking back button, then check out this
faq
http://www.extremeexperts.com/Net/FA...ackButton.aspx

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Scott M." <No****@NoSpam.com> wrote in message
news:u1**************@TK2MSFTNGP11.phx.gbl...
It is NOT possible with ASP.NET and (as you point out) it is not reliable

in
client-side code either.

"Jeff Evans" <jwevans1@you_eye_you_see.edu> wrote in message
news:Or**************@tk2msftngp13.phx.gbl...
> Scott M. < No****@NoSpam.com > wrote:
>> Not possible.
>> "John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
>> news:%2****************@TK2MSFTNGP12.phx.gbl...
>>> asp.net 1.1
>>> ie 6
>>> how to lock-out the user from clicking the browser "Back" button ?
>
> It is possible, with javascript, but you cannot depend on it working (user > can disable js, may not have it, etc.). Google "disable back javascript" >



Nov 19 '05 #7
Try putting it in your code Behind..
Hope that helps..
Patrik

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #8
yes, i know that it belongs in the "code-behind" (more properly the class
associated with the web-form) .... but i am attempting to locate the code in
a single location and have it apply to all pages in my application
"Patrick Olurotimi Ige" <pa*********@crazyjohns.com.au> wrote in message
news:e9**************@TK2MSFTNGP09.phx.gbl...
Try putting it in your code Behind..
Hope that helps..
Patrik

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

Nov 19 '05 #9
Back button will be visible only if go with this approach. Advantage in this
method is, you can restrict the user from viewing cached page. You need to
place the code in each page. If you want you write handler for this stuff,
so you no need to put it in every page.

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:u$**************@tk2msftngp13.phx.gbl...
Hi Saravana.

In regards to "disabling the IE Back button" in my ASP.NET application ...

My objective is to prevent the user from seeing any of the pages previously visited in my application -- so removing them from the cache sounds like the correct solution.

I assume with your solution, the "Back" button stays visible on the browser? What happens if the user clicks it? I'd prefer that the current page remain shown.
Response.Buffer = True
Response.ExpiresAbsolute = Now().Subtract(New TimeSpan(1, 0, 0, 0))
Response.Expires = 0
Response.CacheControl = "no-cache"

Where to locate the above code? Does it have to be placed in every page?
Such as in the OnPreRender event ?

Or is there a way to implement this technique globally for my entire asp.net application ?

Thanks.
John.
--------------

you wrote:

"Saravana" <sa******@sct.co.inwrote in message
news:Ml*****************@news.cpqcorp.net...
Its not possible to do that in asp.net. If your requirement is that user
shouldnt see the cached page by clicking back button, then check out this
faq
http://www.extremeexperts.com/Net/FA...ackButton.aspx
--
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com

"Saravana" <sa******@sct.co.in> wrote in message
news:Ml*****************@news.cpqcorp.net...
Its not possible to do that in asp.net. If your requirement is that user
shouldnt see the cached page by clicking back button, then check out this faq
http://www.extremeexperts.com/Net/FA...ackButton.aspx

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Scott M." <No****@NoSpam.com> wrote in message
news:u1**************@TK2MSFTNGP11.phx.gbl...
It is NOT possible with ASP.NET and (as you point out) it is not
reliable in
client-side code either.

"Jeff Evans" <jwevans1@you_eye_you_see.edu> wrote in message
news:Or**************@tk2msftngp13.phx.gbl...
> Scott M. < No****@NoSpam.com > wrote:
>> Not possible.
>> "John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
>> news:%2****************@TK2MSFTNGP12.phx.gbl...
>>> asp.net 1.1
>>> ie 6
>>> how to lock-out the user from clicking the browser "Back" button ?
>
> It is possible, with javascript, but you cannot depend on it working

(user
> can disable js, may not have it, etc.). Google "disable back

javascript"
>



Nov 19 '05 #10
what is the solution so that the "Back" button actually does not appear on
the browser ?

can that solution be implemented server-side ?

i assume that solution applies only to browsers hosting the web-app in
question ...
Nov 19 '05 #11
Even if the button isn't visible, there is always shortcut keys like
Backspace and Alt left arrow..

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Fri, 24 Dec 2004 15:54:24 -0800, "John A Grandy"
<johnagrandy-at-yahoo-dot-com> wrote:
what is the solution so that the "Back" button actually does not appear on
the browser ?

can that solution be implemented server-side ?

i assume that solution applies only to browsers hosting the web-app in
question ...


Nov 19 '05 #12

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

Similar topics

4
3212
by: Felix Natter | last post by:
hi, I would like to lock a record so that when one user is modifying a particular record, then it is locked for all other users. For this purpose, I have two fields in every table ("LockedBy int null", which contains the UserID of the editing user and "LockedSince int not null", a timestamp). My current logic is: when the user enters...
8
6618
by: Ralph Freshour | last post by:
Is it possible to inhibit the browser Back/Fwd buttons via PHP? Thanks...
5
2471
by: B.r.K.o.N.j.A. | last post by:
I've made a script for managing shoppingcart (something like cart.php?action=add&item=12345) and it works fine, the problem is: when user hits the back button page after he added something in the cart, the add cart script is rerun and he ends up with having 2 of the same item. Is there a way to prevent script from running when accessed via...
1
1314
by: Phil | last post by:
Hello I have a strange behaviour. I have a datagrid, with articles that have to be produced today or the day after. In this program one can see the articles, that have already been planned (just for control). Now it can be, that the planner has realised that he planned something wrong for this article. So he has the possiblity to lock it...
2
1138
by: Hunzian | last post by:
HI ALL.. WELL I GOT A LITTLE TRICKY PROBLEM .... THE PROBLEM IS ... WHEN I SIGNOUT USING THE BUTTON(FORMSAUTHENTICATION.SIGNOUT()); RESPONSE.REDIRECT("LOGIN.ASPX")...IT REDIRECTS ME TO LOGIN.ASPX...THATS FINE........BUT WHEN I CLICK THE BACK BUTTON OF IE IT AGAIN REDIRECTS ME TO WHERE I WAS BEFORE......I DON'T WANT TO GO BACK WHEN I...
10
2948
by: Ami | last post by:
Hello everyone, I have developed a small access application and now I need to lock my forms against unwanted edits. I have used the code by Allen Browne I found here http://allenbrowne.com/ser-56.html and it works great, but I need to unlock and lock my main form and subform separately, using two different buttons.
4
7796
by: Chris Dunaway | last post by:
I have a main form with a "lock" button. When the lock button is clicked, another form is shown using ShowDialog(this). The user must enter their PIN on this form to close it and resume the main app. Because it is showing using ShowDialog(this), the main form in the back cannot be used until the user clears the login form. A feature was...
0
1218
by: deoraj | last post by:
Hi everyone, Can anyone tell me how to lock / deactivate "Refresh" and "Back" button on browser. Problem is in voting application. Once we click for a vote application goes to next page and increament one vote in the database. But when we click on "Refresh" button on the browser, the query is fired again and again one vote is added...
6
9701
by: marss | last post by:
Hi, How can I define in Firefox whether the left mouse button is pressed when I move mouse over a html element? The documentation says that "e.button == 0 for standard 'click', usually left button" http://developer.mozilla.org/en/docs/DOM:event.button Tracing of mouse clicks or mousedown/mouseup events looks not reliable, because mouse can...
4
10089
by: Heinrich Wolf | last post by:
Hi all I have a history.back() problem with FF(2). IE works as expected, while FF does not. The multi frame website setup as a whole with a lot of frame content switching works flawlessly in both browsers. In one situation and frame I have a long scrollable list of cars offered for sale. Some list lines are linked to a separate page with...
0
7270
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7178
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7397
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7565
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7543
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5103
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3255
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
1612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
473
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.