943,758 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 90766
  • ASP.NET RSS
You are currently viewing page 1 of this multi-page discussion thread
Nov 22nd, 2005
0

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

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
cumadhu is offline Offline
19 posts
since Sep 2005
Nov 23rd, 2005
0

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

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:
ASP.NET Syntax (Toggle Plain Text)
  1. <script language="JavaScript">
  2. <!--
  3. javascript:window.history.forward(1);
  4. //-->
  5. </script>

Put that script at the top of every page. If user hits back button it will send them forward again.
Reputation Points: 14
Solved Threads: 19
Posting Pro in Training
campkev is offline Offline
484 posts
since Jul 2005
Nov 24th, 2005
0

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

Quote 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:
ASP.NET Syntax (Toggle Plain Text)
  1. <script language="JavaScript">
  2. <!--
  3. javascript:window.history.forward(1);
  4. //-->
  5. </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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
cumadhu is offline Offline
19 posts
since Sep 2005
Aug 1st, 2006
0

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

[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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sunilfromindia is offline Offline
3 posts
since Jul 2006
Aug 1st, 2006
0

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

Hi where should I place javascript
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sunilfromindia is offline Offline
3 posts
since Jul 2006
Aug 1st, 2006
0

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

just like it says, at the top of every page
Reputation Points: 14
Solved Threads: 19
Posting Pro in Training
campkev is offline Offline
484 posts
since Jul 2005
Aug 1st, 2006
0

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

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 3:17 pm.
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Dec 29th, 2006
0

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

you cant disable only the back button
but u can sure hide the status bar (which includes several other buttons like refresh, forward etc )
Reputation Points: 10
Solved Threads: 0
Newbie Poster
prst123 is offline Offline
1 posts
since Dec 2006
Dec 29th, 2006
0

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

Which can be gotten back again with one click.

Make a decent application instead; save yourself work and your users hassle.
Reputation Points: 13
Solved Threads: 4
Junior Poster in Training
nikkiH is offline Offline
79 posts
since Dec 2006
Sep 9th, 2007
0

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

Click to Expand / Collapse  Quote originally posted by tgreer ...
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 @.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rbeasley is offline Offline
1 posts
since Sep 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: dynamic gridview dropdownlist question
Next Thread in ASP.NET Forum Timeline: pass selected gridview row to another gridview on another page





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC