B
=B=
Hi all,
I was wondering if anyone has had any luck with trapping the <BODY>
onUnload() event in ASP.NET?
The thing is, I'm writing code for an Intranet site. The code makes a
call to a third-party component (think of it as a lock) when the page
loads. Now the OK and Cancel server buttons I can handle and use to
release the lock as required. But previously in classic ASP I had
been trapping the user hitting the close 'x' button by using
JavaScript in the onUnload() event of the <BODY> tag. This JavaScript
would submit a form to a dedicated page which would retrieve the form
values and release the specified lock.
Does anyone know if it's possible to trap this with ASP.NET alone?
I've tried adapting my old classic ASP way but it gets really messy
with the postbacks causing an onUnload() to fire, etc.
Any help would be greatly appreciated.
Thanks,
B.
I was wondering if anyone has had any luck with trapping the <BODY>
onUnload() event in ASP.NET?
The thing is, I'm writing code for an Intranet site. The code makes a
call to a third-party component (think of it as a lock) when the page
loads. Now the OK and Cancel server buttons I can handle and use to
release the lock as required. But previously in classic ASP I had
been trapping the user hitting the close 'x' button by using
JavaScript in the onUnload() event of the <BODY> tag. This JavaScript
would submit a form to a dedicated page which would retrieve the form
values and release the specified lock.
Does anyone know if it's possible to trap this with ASP.NET alone?
I've tried adapting my old classic ASP way but it gets really messy
with the postbacks causing an onUnload() to fire, etc.
Any help would be greatly appreciated.
Thanks,
B.