Asp.net| page
During the life cycle of asp.net pages, the Page object exposes some standard events that are frequently used. The ASP.net page framework is automatically connected to (wired) the appropriate proxy instances of these methods at run time. You don't need to write the necessary "glue code". The following list provides a proxy instance of a run-time connection in the order of excitation:
Page_Init: During this event, you can initialize the value or connect any event handlers that may be present.
Page_Load: During this event, you can perform a series of actions to create a ASP.net page for the first time or to respond to a client event caused by a post. Before this event, the page and control view state were restored. Use the IsPostBack page property to check whether the page is processed for the first time. If this is the first process, perform data binding. Also, read and update control properties.
Page_databind: The DataBind event is raised when the DataBind method is called at the page level. If DataBind is invoked on a single control, it fires only the DataBind event of the control below it.
Page_PreRender: Fires the PreRender event just before the view state is saved and the control is rendered. You can use this event to perform all last-minute operations on the control.
page_unload: The Page_Unload event is fired after the page rendering is complete. This event is the appropriate place to perform the final cleanup effort. This includes actions such as cleaning open database connections, discarding objects, or closing open files.
The following list summarizes non-deterministic events. Page_Error: If an unhandled exception occurs during page processing, the Error event is fired. The error event gives you the opportunity to properly handle the error.
page_aborttransaction: Trading events are useful if you want to indicate whether a transaction is a success or a failure. This event is typically used in the shopping cart scenario, where this event can indicate whether the order was successful or failed. This event is fired if the transaction has been terminated.
Page_committransaction: This event is fired if the transaction was successfully submitted.