When a request is hit to IIS under ASP.NET application which consist of master page and aspx pages, both the contain event handles the controls. A control in a content page raises an event in the content page, and a control in the master page raises an event in the master page.
The following is the sequence in which events occur when a master page is merged with a content page:
- Content page PreInit event.
- Master page controls Init event.
- Content controls Init event.
- Master page Init event.
- Content page Init event.
- Content page Load event.
- Master page Load event.
- Master page controls Load event.
- Content page controls Load event.
- Content page PreRender event.
- Master page PreRender event.
- Master page controls PreRender event.
- Content page controls PreRender event.
- Master page controls Unload event.
- Content page controls Unload event.
- Master page Unload event.
- Content page Unload event.
Hope this helps!