Want to do some action while closing the window

Hi, I am sabareeswaren currently doing a project. i am doing the project in asp.net using c#. could any one tell me how to do some action(Update the database) while closing the window? Its very urgent, so please any one help me..... Thanks in Advance!!!!! Sabareeswaren.

1 Reply

AD Administrator Syncfusion Team June 8, 2006 08:36 AM UTC

Hi, The following code is for getting the textbox value while closing the window window.onbeforeunload = function() { if((window.event.clientX<0) || (window.event.clientY<0)) { onBeforeUnloadAction(); } } function onBeforeUnloadAction() { var textValue; textValue=document.getElementById(''TextBox'').value; alert("Text Value : "+textValue); } Thanx

Loader.
Up arrow icon