User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 391,944 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,880 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 45618 | Replies: 11
Reply
Join Date: Sep 2005
Posts: 19
Reputation: cumadhu is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
cumadhu cumadhu is offline Offline
Newbie Poster

Help How to disable Back button of IE when executing welcome.aspx page?

  #1  
Nov 21st, 2005
Hi All,
I need to disable Back button of IE when an welcome.aspx page load into the browser.
I dont want the user to click back button after logging in.

Is there any code to disable the back button of IE?

Please send your suggestions.


Thanks and with regards,
Madhusudhan.H.K.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2005
Location: Dallas, TX
Posts: 481
Reputation: campkev is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Re: How to disable Back button of IE when executing welcome.aspx page?

  #2  
Nov 23rd, 2005
short answer is No. There is no direct way to disable the back button so that it is greyed-out and user cannot click on it. However, there are some tricks using javascript which might be able to give you the results you need,although they won't be as pretty. One I am currently working on involves using javascripts window.history function with a session variable and automatically logging off and redirecting to login page if user hits the back button. You can also do something as simple as:
<script language="JavaScript">
<!--
  javascript:window.history.forward(1);
//-->
</script>

Put that script at the top of every page. If user hits back button it will send them forward again.
Reply With Quote  
Join Date: Sep 2005
Posts: 19
Reputation: cumadhu is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
cumadhu cumadhu is offline Offline
Newbie Poster

Re: How to disable Back button of IE when executing welcome.aspx page?

  #3  
Nov 23rd, 2005
Originally Posted by campkev
short answer is No. There is no direct way to disable the back button so that it is greyed-out and user cannot click on it. However, there are some tricks using javascript which might be able to give you the results you need,although they won't be as pretty. One I am currently working on involves using javascripts window.history function with a session variable and automatically logging off and redirecting to login page if user hits the back button. You can also do something as simple as:
<script language="JavaScript">
<!--
  javascript:window.history.forward(1);
//-->
</script>

Put that script at the top of every page. If user hits back button it will send them forward again.



Yes ! Its working.
Thanks a lot,
Madhusudhan
Reply With Quote  
Join Date: Jul 2006
Posts: 3
Reputation: sunilfromindia is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sunilfromindia sunilfromindia is offline Offline
Newbie Poster

Re: How to disable Back button of IE when executing welcome.aspx page?

  #4  
Aug 1st, 2006
[quote=cumadhu]Hi All,
I need to disable Back button of IE when an welcome.aspx page load into the browser.
I dont want the user to click back button after logging in.

Is there any code to disable the back button of IE?


where should I place the java script
Thanks and Regards,

Sunil Anupuru,

Bangalore,

India
Reply With Quote  
Join Date: Jul 2006
Posts: 3
Reputation: sunilfromindia is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sunilfromindia sunilfromindia is offline Offline
Newbie Poster

Re: How to disable Back button of IE when executing welcome.aspx page?

  #5  
Aug 1st, 2006
Hi where should I place javascript
Thanks and Regards,

Sunil Anupuru,

Bangalore,

India
Reply With Quote  
Join Date: Jul 2005
Location: Dallas, TX
Posts: 481
Reputation: campkev is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Re: How to disable Back button of IE when executing welcome.aspx page?

  #6  
Aug 1st, 2006
just like it says, at the top of every page
Reply With Quote  
Join Date: Dec 2004
Posts: 1,589
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 34
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: How to disable Back button of IE when executing welcome.aspx page?

  #7  
Aug 1st, 2006
There is no way to disable the back button reliably. Every method, short of writing your own browser, can be easily disabled. This question has been asked millions of times, for years and years. The "back" button is integral to how browsers work, and is firmly a part of the user interface and the collective "user expectation". Trying to fight it is usually a sign of poor understanding of the web, a flawed application model , and/or bad design!

Users will press the "back" button. They will be irritated if it doesn't work. They will often simply close the browser completely if your application doesn't behave as they expect.
Last edited by tgreer : Aug 1st, 2006 at 2:17 pm.
Reply With Quote  
Join Date: Dec 2006
Posts: 1
Reputation: prst123 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
prst123 prst123 is offline Offline
Newbie Poster

Re: How to disable Back button of IE when executing welcome.aspx page?

  #8  
Dec 29th, 2006
you cant disable only the back button
but u can sure hide the status bar (which includes several other buttons like refresh, forward etc )
Reply With Quote  
Join Date: Dec 2006
Location: Near Chicago
Posts: 79
Reputation: nikkiH is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 4
nikkiH's Avatar
nikkiH nikkiH is offline Offline
Junior Poster in Training

Re: How to disable Back button of IE when executing welcome.aspx page?

  #9  
Dec 29th, 2006
Which can be gotten back again with one click.

Make a decent application instead; save yourself work and your users hassle.
Google is your friend. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
Bored? Visit http://www.kaelisspace.com/
Reply With Quote  
Join Date: Sep 2007
Posts: 1
Reputation: rbeasley is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
rbeasley rbeasley is offline Offline
Newbie Poster

Re: How to disable Back button of IE when executing welcome.aspx page?

  #10  
Sep 9th, 2007
Originally Posted by tgreer View Post
There is no way to disable the back button reliably. Every method, short of writing your own browser, can be easily disabled. This question has been asked millions of times, for years and years. The "back" button is integral to how browsers work, and is firmly a part of the user interface and the collective "user expectation". Trying to fight it is usually a sign of poor understanding of the web, a flawed application model , and/or bad design!

Users will press the "back" button. They will be irritated if it doesn't work. They will often simply close the browser completely if your application doesn't behave as they expect.


*****

I am sometimes amazed at the arrogance of some software developers who think that, of the 6+ billion people on the earth, no one could possible have a need to disable the back button. We just are stupid and don't understand the problem. Well, he's wrong. Hint: Just help people with their questions and don't be a smart @.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ASP.NET Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 8:54 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC