Sunday, December 18, 2011

Asp.net: Page Life Cycle of Master Page

When your page is inherited from master page, HTML, form & body tags are not allowed in content page.
If your page is inherited from master page then the sequence of event will be as

Master Page's
protected void Page_init(object sender, EventArgs e)
{

}


Content Page
protected void Page_init(object sender, EventArgs e)
{

}

protected void Page_Load(object sender, EventArgs e)
{

}


Master page's
protected void Page_Load(object sender, EventArgs e)
{

}

Content page
protected void Page_prerender(object sender, EventArgs e)
{

}

Master Page's
protected void Page_prerender(object sender, EventArgs e)
{

}

Master Page's
protected void Page_Unload(object sender, EventArgs e)
{

}

and finally Content page's
protected void Page_Unload(object sender, EventArgs e)
{

}

0 comments: