I suggest reading about the life cycle of an ASP.NET page .
Both have different goals, therefore, a different order of execution.
Initialization:
During page initialization, the controls on the page are available and each UniqueID control is installed. In addition, the master page and themes are also applicable on the page. If the current request is postback, postback data has not yet been loaded, and control property values ββhave not been restored to values ββfrom the view state.
Load:
At boot time, if the current request is reverse processing, control properties are loaded with information recovered from the view state and control state.
In addition, you need to understand the relationship between the main pages and the content pages (the main pages are actually included in the content pages, and not vice versa) and the full life cycle of both .
So, during initialization, you must first initialize the user controls, so they are available for their container, and then the main page so that the content is available on the content page, and then the page itself, completing the initialization of the control hierarchy.
At boot time, the opposite happens, since now all the data of the reverse gear is installed and all the controls are ready and can trigger different events. The top container, the content page is loaded first (since it can change the main page and user controls), then the main page and at the end of the sheet control.
Odded source share