Frequently Asked Interview Questions

Can you dynamically attach a master page to any aspx page?

Yes, a master page can assign to any page dynamically through code, at pre initialization stage of a page, code shown below.

protected override void Page_PreInit(object sender, EventArgs e)
{
this.MasterPageFile = “~/MainMenu.master”;
}

Most Visited Pages

Home | Site Index | Contact Us