I want to disable close button (x) in internet explorer in my asp.net application
how to do that
maxmax
thank you
Hi Max,
I dont know myselft, but easier way would be write an on WebForm_Closing event, write some thing as e.cancel, may be go on these lines. I think its best way.
Cheers.
Dinesh.
Your Lucky Max, It can be done by Client Side Java script, here's the code,
You have to set event.returnValue to something other then empty string to prevent window from closing.
<HTML>
<HEAD>
<SCRIPT>
function dontClose()
{
event.returnValue = "Any string value here forces a dialog box to \
appear before closing the window.";
}
</SCRIPT>
</HEAD>
<BODY onbeforeunload="dontClose()">
<a href="http://links.10026.com/?link=http://www.yoursite.com" >Click here to navigate to
www.yoursite.com< /a >
</BODY>
</HTML
So tidy up the code, and run it, should work
0 comments:
Post a Comment