Many times we get confused that Master page is Parent page, but this is not
fact.
I was trying to find the sequence of event between Master page and Aspx page
(and User control and ASPX page),
then I came to know that sequence of events are same in both the cases
Problem Statement
Why MasterPage Behave like UserControl
Solution
I would like to explain why behavior is same in both of cases:
- Base class of Page is System.Web.UI.Page
- Base class of Usercontrol is
System.Web.UI.UserControl
- Base class of MasterPage is
System.Web.UI.MasterPage
And Base class of System.Web.UI.MasterPage is
UserControl
So from thrid point, Indirectly Masterpage inherit from Usercontrol so it behave
like a Usercontrol.
So Masterpages behave like child controls on a page.