Can you dynaimically assign a Master Page?

 Posted by deccansoft on 10/30/2010 | Category: ASP.NET Interview questions | Views: 1421

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"; }

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response