Saturday, July 21, 2007

PreInit
Check the IsPostBack property
Create/Recreate dynamic controls
Set a master page dynamically
Set the Theme property dynamically
Read or set profile property values

Init
Raised after all controls have been initialized
Raised after all Skin settings have been applied
Used to read or initialize control properties

InitComplete
Raised by Page object
Used for processing tasks that need initialization to be complete

PreLoad
At this event, page loads viewstate for itself and all the controls
Processes any postback data included with the Request instance

Load
Page calls the OnLoad event method on the Page
Then recursively does the same for each child control
Use the OnLoad method to initialize controls and database connections

Control Events
Use this to handle control events like Click, TextChanged

LoadComplete

PreRender
Before this event occurs:
Page object calls EnsureChildControls for each control and for the page
For each data bound control with datasource, databind is called
b. PreRender event occurs for each control on the page

SaveStateComplete
At this stage Viewstate is saved for the page and all the controls
Any changes to the page/control will be ignored
Use this event to perform tasks that require viewstate to be saved

Render
This is not an event
It is a stage of processing when Render method is called for each control
All asp.net server controls have render, that write control markup for the browser

Unload
This event occurs for each control and then for the page
Use this event for final cleanup, such as closing database connections

No comments:

Post a Comment