Sunday, September 12, 2010
How to assign Master Page to a Content Page
There are many ways to assign a Master page to a Content page.
1. Using Page Directive
2. Using Web Config
This will set the Master file for all the Pages in the Web application
3. Programmatically from Content page
protected void Page_PreInit(object sender, EventArgs e)
{
Page.MasterPageFile = "~/SiteExample.Master";
}
1. Using Page Directive
2. Using Web Config
This will set the Master file for all the Pages in the Web application
3. Programmatically from Content page
protected void Page_PreInit(object sender, EventArgs e)
{
Page.MasterPageFile = "~/SiteExample.Master";
}
Subscribe to:
Posts (Atom)