We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Want to do some action while closing the window

Thread ID:





43145 Apr 17,2006 10:15 AM UTC Jun 8,2006 08:36 AM UTC ASP.NET Web Forms (Classic) 1
Tags: FAQ
Asked On April 17, 2006 10:15 AM UTC

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.

Administrator [Syncfusion]
Replied On 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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon