praetorean
asked on
how to capture the page unload event in vb.net on asp.net
hi all,
does anyone know how to capture a page's unload event? something like a windows form's form_unload event?...
i need to be able to validate that event when the page is being closed, navigated from or to another page to prompt the user to save the data...
thanks in advance
does anyone know how to capture a page's unload event? something like a windows form's form_unload event?...
i need to be able to validate that event when the page is being closed, navigated from or to another page to prompt the user to save the data...
thanks in advance
Please go through this link
http://msdn.microsoft.com/ en-us/libr ary/system .web.ui.co ntrol.unlo ad.aspx
i have given yiou example in c#
http://msdn.microsoft.com/
i have given yiou example in c#
protected void Page_unLoaded(object sender, EventArgs e)
{
.....
.....
....
}
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
as posted above:
"i have opted to forgo on this approach in the sense that the unload event would be a limitation while, any events triggered from the page's UI control would be checked to save the data on the page..."
"i have opted to forgo on this approach in the sense that the unload event would be a limitation while, any events triggered from the page's UI control would be checked to save the data on the page..."
and use
e.Cancel = True
If you don't let the user to close the page.