| | |
How to disable Back button of IE when executing welcome.aspx page?
Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
Join Date: Jul 2005
Posts: 483
Reputation:
Solved Threads: 19
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:
Put that script at the top of every page. If user hits back button it will send them forward again.
ASP.NET Syntax (Toggle Plain Text)
<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.
•
•
Join Date: Sep 2005
Posts: 19
Reputation:
Solved Threads: 0
•
•
•
•
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)
<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
•
•
Join Date: Jul 2006
Posts: 3
Reputation:
Solved Threads: 0
[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
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
Sunil Anupuru,
Bangalore,
India
•
•
Join Date: Dec 2004
Posts: 1,655
Reputation:
Solved Threads: 35
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.
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.
Which can be gotten back again with one click.
Make a decent application instead; save yourself work and your users hassle.
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/
Bored? Visit http://www.kaelisspace.com/
•
•
Join Date: Sep 2007
Posts: 1
Reputation:
Solved Threads: 0
•
•
•
•
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 @.
![]() |
Similar Threads
- Using Back Button Refreshes Page (Web Browsers)
Other Threads in the ASP.NET Forum
- Previous Thread: visual studio 2003 Report
- Next Thread: Forum System - Where to Store Data?
| Thread Tools | Search this Thread |
.net 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer c# c#gridviewcolumn cac checkbox class commonfunctions compatible confirmationcodegeneration content countryselector courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deployment development dgv dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash formatdecimal forms formview gridview gudi homeedition iframe iis javascript jquery listbox microsoft mouse mssql multistepregistration nameisnotdeclared news objects opera panelmasterpagebuttoncontrols problem redirect registration relationaldatabases reportemail rotatepage schoolproject security sessionvariables silverlight smartcard smoobjects software sql sql-server sqlserver2005 ssl textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visualstudio web webapplications webdevelopemnt webdevelopment webprogramming webservice youareanotmemberofthedebuggerusers






