1
Reply

Can you dynamically assign a Master Page?

Pradeep

Pradeep

15y
5.1k
0
Reply

    Yes, you can assign a master page dynamically during the PreInit stage using the Page class MasterPageFile property as shown in the code sample below.
    void Page_PreInit(Object sender, EventArgs e)
    {
    this.MasterPageFile = "~/MasterPage.master";
    }