3
Reply

Can you change a Master Page dynamically at runtime? How?

Suresh Kumar

Suresh Kumar

8y
722
0
Reply
    Yes for sure.protected void Page_PreInit(object sender, EventArgs e) {this.MasterPageFile = "~/Site.master"; }
    Yes for sure.protected void Page_PreInit(object sender, EventArgs e) {this.MasterPageFile = "~/Site.master"; }
    Yes. To change a master page, set the MasterPageFile property to point to the .master page during the PreInit page event.