3
Reply

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

Suresh Kumar

Suresh Kumar

Oct 31, 2017
619
0

    Yes for sure.protected void Page_PreInit(object sender, EventArgs e) {this.MasterPageFile = "~/Site.master"; }

    Sathiya Moorthy
    December 23, 2017
    0

    Yes for sure.protected void Page_PreInit(object sender, EventArgs e) {this.MasterPageFile = "~/Site.master"; }

    Sathiya Moorthy
    December 23, 2017
    0

    Yes. To change a master page, set the MasterPageFile property to point to the .master page during the PreInit page event.

    Suresh Kumar
    October 31, 2017
    0