Set master file at runtime in content page

Rajni.Shekhar
Posted by Rajni.Shekhar under ASP.NET category on | Points: 40 | Views : 1509
protected void Page_PreInit(object sender, EventArgs e)
{
this.MasterPageFile = "~/" + "masterpagename.master";
}

Comments or Responses

Posted by: balajirnaukri-12656 on: 5/18/2012 Level:Starter | Status: [Member] | Points: 10
But I am getting an error when I declare this in page_PreInit

Login to post response