Re: Saving data while closing a window
- From: "Peter Rilling" <peter@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 29 Nov 2005 11:14:57 -0800
It is unlikely that you will be able to invoke a postback when the window
closes. Now you might be able to hook the close event in JavaScript and
alert the user. Maybe even give them a chance to cancel the close so they
can save their work. Ultimately this would be user error if they close the
window with data that has not been saved.
"M B HONG 20" <charles.lee.82@xxxxxxxxx> wrote in message
news:1133289299.512874.196470@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>I am working on an ASP.NET web application (C#), and need a web form to
> either save data on a click of the "X" (Top right corner of the
> browser) or just disable the "X" altogether. I have a "Save" button
> which is tied to a C# event which saves all of my data via from
> sessions, or from the form directly etc., but i need it to save the
> data in the event that the user decides to close it with the "X". I am
> aware of the browser's native onClose property, but I am not sure if it
> can call a C# command from there, and also if it can call a C# command,
> does that C# command have access to the form's fields? Any help would
> be greatly appreciated.
>
.
- References:
- Saving data while closing a window
- From: M B HONG 20
- Saving data while closing a window
- Prev by Date: Re: Namespaces in Vs2005 and ASP.net 2.0
- Next by Date: Re: Caching
- Previous by thread: Saving data while closing a window
- Next by thread: Namespaces in Vs2005 and ASP.net 2.0
- Index(es):