aspdotnet_website_programming thread: Distinguish when user closes form
Message #1 by andrew@s... on Thu, 6 Mar 2003 21:34:21|
Is there any way to have an asp.net form automatically post back after a
Currently, I am using a http-quiv="refresh" Content="5" meta statement.
The problem is that this causes the form_unload overrider to fire which I
don't want. I want the unload to fire only if the user closes the browser
or clicks the cancel button, not when the form is refreshed.
Message #2 by "ksh pandey" <k****ij_jbp_2001@r...> on 7 Mar 2003 04:06:46 -0000|
u can have a cookie/session variable set it to true /false to
decide weather form_unload has ti fire or not .
if variable is true then
/// all coe in ur unload procedure goes here
And with every refresh set the variable to false
and when browser is closed / cancel is clicked then set it to
hope this helps!!!
On Fri, 07 Mar 2003 andrew@s... wrote :
>Is there any way to have an asp.net form automatically post back
>Currently, I am using a http-quiv="refresh" Content="5" meta
>The problem is that this causes the form_unload overrider to fire
>don't want. I want the unload to fire only if the user closes
>or clicks the cancel button, not when the form is refreshed.
>Professional Design Patterns in VB.NET:
>Building Adaptable Applications
>Want to know how design patterns bring reusable
>design and adaptabilty to your applications? How
>to recognize the need for a design pattern
>solution? How to select, design, and implement
>the right patterns? How parts of the .NET Framework
>(like the .NET Data Providers and .NET Remoting)
>take advantage of design patterns? This book
>presents a practical approach to using design
>patterns in VB.NET, by focusing on the relevance
>of design patterns in the different tiers of a
>distributed n-tier architecture.