The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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.
ADAdministrator 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