Aspx designer not updating
We don’t want to duplicate this code in every webform.A better idea is to create a base class in a class library project, or in the App_Code directory. For web forms with inline code, we just need to change the Inherits attribute of the @ Page directive. If a specific page doesn’t want it’s master page set, it can choose not to derive from Base Page.When the application is executing, it’s better to think of the master page as just another child control.The Pre_Init event we just mentioned is a key event to examine if we want to change the master page file programmatically. We can use the @ Page directive and the web.config to specify master page files for our web forms, but sometimes we want to set the master page programatically.It could be the same type of scenario (we pull the master page name from a database), but we don’t want to depend on developers to derive from a specific base class (imagine a third party uploading content pages).
During this brief slice of time, the master page is deserving of its name.
In fact, the Master Page class derives from the User Control class.