Last post Oct 06, 2017 08:17 AM by Zhi Lv - MSFT
Oct 02, 2017 03:28 AM|hardeshis|LINK
I want to know when these two event occurs.
As per my understanding when we call the page very first time, Init occurs first and then load.
When ever post back happens page_load event gets fired.
Does Init event also gets fired at every post back? and when other times these 2 events gets fired?
And when the controls in that page (e.g. gridview) Init and load event occurs ? with page init, control's init occurs. with page load, control's load occurs? Is this correct?
Oct 06, 2017 08:17 AM|Zhi Lv - MSFT|LINK
Individual ASP.NET server controls have their own life cycle that is similar to the page life cycle.
For example, a control's Init and Load events occur during the corresponding page events.
Raised after all controls have been initialized and any skin settings have been applied. The Init event of individual controls occurs before the Init event of the page.
The Page object calls the OnLoad method on the Page object, and then recursively does the same for each child control until the page and all controls are loaded. The Load event of individual controls occurs after the Load event of the page.
MSDN Documentation for your reference:
ASP.NET Page Life Cycle Overview