Interviews3 answers
Can you change a Master Page dynamically at runtime? How?
3 Answers
Yes for sure.
protected void Page_PreInit(object sender, EventArgs e)
{
this.MasterPageFile = "~/Site.master";
}
Sathiya MoorthyPosted Dec 23, 2017, 4:00 AM EST
Yes for sure.
protected void Page_PreInit(object sender, EventArgs e)
{
this.MasterPageFile = "~/Site.master";
}
Sathiya MoorthyPosted Dec 23, 2017, 4:00 AM EST
Yes. To change a master page, set the MasterPageFile property to point to the .master page during the PreInit page event.
Suresh KumarPosted Oct 31, 2017, 1:39 AM EDT


