Yea, I understand you are still referencing the Inheritance tree diagram
which I think may be wrong for the following reasons primarily there is not
other documentation that explicitly states the MasterPage is derived from
UserControl --but-- there is explicit language that states the MasterPage
class is derived from the Page class which is what TemplateControl does.
[1] Remarks Par. 3:
The resulting compiled, merged class (MasterPage) derives from the Page
class.
[1] Remarks Par. 8:
The master page is made available to the content page through the Master
property of the base Page class.
[2] TemplateControl Class
Provides the Page class and the UserControl class with a base set of
functionality.
Q: Why does the MasterPage have to inherit the Page class when the
TemplateControl class provides the functionality to the MasterPage class as
the documentation explains in writing in several locations?
Q: Why does the documentation for TemplateControl not also mention the
MasterPage class which also derives its functionality from the Page class?
My argument has been there is what we call an "error and omission" and in
the real world there is actually insurance that can be purchased to pay for
the results of these types of errors and omissions when an architect is
simply following the documentation as it is expressed IN WRITING --not-- a
DIAGRAM as the Inheritance tree diagram would be defined in a court of law
where these matters would have to be resolved when the architect misplaces
his or her trust in an assumed trustworthy source only to discover at some
point in time after somebody has the roof fall on their head that there was
in fact an error and omission due to perhaps laziness or some other
generally understood observation of documentation that is contradictory.
The assertion here is basic and fundamental: there is no reason the
MasterPage needs to inherit the User Control to inherit the Page class when
the TemplateControl class makes the Page class available directly.
This is what I mean by strict constructionist. The documentation is either
trustworthy prima facie or it is not trustworthy. As I have shown three
contradictions of proof it must be concluded the documentation --is not
trustworthy prima facie-- which the authors have an obligation to clarify.
It is entirely possible and error has been made since there is clearly
documentation that contradicts the Inheritance tree diagram implying the
diagram itself may be incorrect and its the diagram and only the diagram
that most of you have relied on yet I have shown three proofs that
contradict the diagram. Its entirely possible the persons writing these
documentation pages simply did not know or did not care to use the correct
statement for the tree control used to generate that specific Inheritance
tree diagram is it not? This is my assertion.
Finally, I am no wizard at using reflection but given the time it would be
useful to fire up Roeder's tool and read the IL which I continue to think
will show no sign of the User Control class when a master page is being
compiled.
[1]
http://msdn.microsoft.com/en-us/library/system.web.ui.masterpage.aspx
[2]
http://msdn.microsoft.com/en-us/library/system.web.ui.templatecontrol.aspx