Currently in a debate at work and I cannot fathom why someone would intentionally avoid Inheritance with Master Pages.
For reference here is the project setup:
- nested MainMasterPage
- MainMasterPage (from BaseProject)
The debate came up because some code in BaseProject needs to know about "SomeEvent". With the setup above, the code in BaseProject needs to call
this.Master.Master. That same code in BaseProject also applies to OtherSiteProject which is just accessed as
SiteMasterPage has no code differences, only HTML differences.
If SiteMasterPage Inherits MainMasterPage rather than Nests it, then all code is valid as
Can anyone think of a reason why to use a Nested Master Page here instead of an Inherited one?