to set master page for any page at run time. u need to write following code
protected void Page_PreInit(object sender, EventArgs e)
{
this.MasterPageFile = "~/Business_Partner/businesspartner.Master";
}
but page should contain contentplaceholder of same name as it is in master which u are assigning it.
Set Master Page at Runtime
Posted by
Rajesh Rolen
at
Tuesday, December 9, 2008
Labels: ASP.NET , Master Pages
0 comments:
Post a Comment