Does anyone know how to change the Masterpage of a Masterpage at Runtime. For a Page, there is a PreInit event where we can change the master page dynamically. No such event exists for the Masterpage. I also tried changing the masterpage in the Constructor of the base class, which too doesn’t work.
Many Thanks,
Arun
In your BasePage override
OnPreInitmethod and assign the master page’s master page as shown belowthis.Page.Master.MasterPageFile = "~/SuperSitem.master";