I know ViewState is available between InitComplete and Preload events in LoadViewSate method. Similarly, I want to know in which page lifecycle event can we assign a master page for a particular page?
Because the master page and content page are merged during the initialization stage of page processing, a master page must be assigned before then. Typically, you assign a master page dynamically during the PreInit stage
On Page PreInit
event
void Page_PreInit(Object sender, EventArgs e)
{
this.MasterPageFile = "~/MyMaster.master";
}