Done it all wrong :(
Tuesday, August 08, 2006
Friday, August 04, 2006
Master Pages - Event Ordering
Event Order when Master and Content Ordered
Master Pages child control Initialisation
All server controls contained within the master pages
Content page child controls Initialisation
All server controls contained within the content pages
Master Page initialisation
Page is initialised
Content Page Initialisation
Page is initialised
Content Page Load
The Page_Load event is followed by the Page_LoadComplete event
Master Page Load
The Page_Load event is followed by the Page_LoadComplete event
Master Page Child Controls load
The server controls on the master page are loaded onto the page
Content Page Child Controls load
The server controls on the content page are loaded onto the page
For Example
This is important. If you want to use control values from a master page on the content page you can't do this in the Page_Load event of the content page.
Use the Page_LoadComplete event of the content page which happens after the Page_Load event of the master page.
-
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.
-
Content controls Load event.
-
Content page PreRender event.
-
Master page PreRender event.
-
Master page controls PreRender event.
-
Content controls PreRender event.
Master Pages child control Initialisation
All server controls contained within the master pages
Content page child controls Initialisation
All server controls contained within the content pages
Master Page initialisation
Page is initialised
Content Page Initialisation
Page is initialised
Content Page Load
The Page_Load event is followed by the Page_LoadComplete event
Master Page Load
The Page_Load event is followed by the Page_LoadComplete event
Master Page Child Controls load
The server controls on the master page are loaded onto the page
Content Page Child Controls load
The server controls on the content page are loaded onto the page
For Example
This is important. If you want to use control values from a master page on the content page you can't do this in the Page_Load event of the content page.
Use the Page_LoadComplete event of the content page which happens after the Page_Load event of the master page.
Subscribe to:
Comments (Atom)