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.
No comments:
Post a Comment