Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there any way of disabling the Red "X" on the top of Internet Explorer, Firefox,etc. using ASP.net vb code so I can only leave the program by a button, cntl-alt-delete or unplugging the computer?
Posted
Comments
Sanket Saxena 6-May-14 6:06am    
I think no you cant disable it. But why don't you do one thing instead of disabling it when the use close it then pop up a message and stay on the same page.

1 solution

From the server? No - you don't have access to the browser form window for security reasons.
And to be honest, if it was possible, and I visited a site that did it, I wouldn't ever go back.
 
Share this answer
 
Comments
[no name] 6-May-14 5:46am    
He want to force people to use the Log out button and not be able to close the web page when they want to leave ...
OriginalGriff 6-May-14 6:09am    
Probably, yes - but it won't work. Even if he could disable the "X", I could still:

Press the Back button, then close it.
Close the tab in Chrome / Firefox / IE without closing the browser.
Enter a new URL and go there.
Use a bookmark.
Use CTRL+SHIFT+ESC and terminate the app.

And quite a few other ways.
[no name] 6-May-14 9:05am    
I know that but he probably doesn't

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900