Last post Jul 06, 2017 07:52 AM by ryoka012
Jul 06, 2017 03:16 AM|ryoka012|LINK
Base on your actual experience
What is the difference of the two and which is better to use for unloading a Data.
Jul 06, 2017 07:17 AM|hkholakiya|LINK
Page OnUnload event is page event while UnLoad is controls event. Se below diagram:
Raised for each control and then for the page.
In controls, use this event to do final cleanup for specific controls, such as closing control-specific database connections.
For the page itself, use this event to do final cleanup work, such as closing open files and database connections, or finishing up logging or other request-specific tasks.
There is an event Page.Unload. At that moment page is already rendered in HTML and HTML can't be modified. Still, all page objects are available.
Note: UnLoad event called before OnUnload event. So you can final clean up code kept in OnUnload event as page life cycle telling.
Jul 06, 2017 07:52 AM|ryoka012|LINK
thanks for your reply..
So the best way to unload Data or connection is using the Page Event OnUnload.