depending upon browser's closing is a bad design.
consider this what if something went wrong and say IE closed all instances..
or the person went to task manager and closed the instance. what if the
person browsed to another site ?
At those time you will not be able to trap the unload event.
The event you want is a onunload event on the page.
its available clientside so you will have to use javascript.
say redirect to another page which has sole responsibility of releasing the
locks and onload of that page make sure it has javascript
:window.close();
ie in the second page.. on serverside you can directly unlock before the
page is rendered. when its rendered on the clients browser window.close will
fire.
i am not sure to what extent this will work. but you can always spawn
another window using javascript
:window.open();
Would like to stress on it so mentioning it again. Relying on onunload is
not desirable and you would face instances were the items were kept locked
because the call unload event never called
Pray that your clients dont XP SP2 and if they have it they havent disabled
Popup blocker or if anything they arent using any popupblockers
--
Regards,
Hermit Dave
(
http://hdave.blogspot.com)
"RJN" <rj*@yahoo.com> wrote in message
news:#W**************@TK2MSFTNGP09.phx.gbl...
Hi
I have a datagrid which has linkbutton as a template column. The
Linkbutton is used to open new windows. I can open multiple windows at a
time. On close of any of the child windows,(i.e, on click of "X" at
TopRight corner) I have to perform a database operation, basically to
release some locks and I can do only on closing of window. How I can I
do this. Is there any Page event? Page_Unload didn't help me.
Thanks
RJN
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!