CJ

The circle of life – ** .Net – Training – MOSS **

  • Past Post

  • Vistor Locations

Events in Master & Content Pages

Posted by Clayton James on November 13, 2006

I was asked a question today while teaching an ASP.NET course about the sequence of events between a Master page and Content page, and if they both have the same event (say a Page_Load) then which one fires first.

I found the following information on msdn and more.

 

The following is the sequence in which events occur when a master page is merged with a content page:

  1. Master page controls Init event.

  2. Content controls Init event.

  3. Master page Init event.

  4. Content page Init event.

  5. Content page Load event.

  6. Master page Load event.

  7. Content controls Load event.

  8. Content page PreRender event.

  9. Master page PreRender event.

  10. Master page controls PreRender event.

  11. Content controls PreRender event.

Advertisements

One Response to “Events in Master & Content Pages”

  1. Mick said

    CJ – dont forget about the pre-inits as well.

    To set themes of the page etc.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: