re:
!MasterPage class is derived from System.Web.UI.UserControl as opposed to System.Web.UI.Page.
The UserControl, Page and MasterPage classes all are subclasses of System.Web.UI.
See :
http://quickstarts.asp.net/QuickStar...=System.Web.UI
When an HTTP request is made for a page at run time, the master page and content
pages are combined into a single class with the same name as the content pages.
The *resulting* compiled, merged class derives from the Page class.
The MasterPage class derives (inherits, actually) from Control,
and is last in a chain which includes Control, TemplateControl and UserControl:
Here's the inheritance hierarchy for the MasterPage class :
System..::.Object
System.Web.UI..::.Control
System.Web.UI..::.TemplateControl
System.Web.UI..::.UserControl
System.Web.UI..::.MasterPage
The master page is initialized as the top control in a page’s control hierarchy by
clearing the page’s Controls array and adding the master page to the Control collection.
The master page initialization happens after the PreInit event
fires for a Page object, but before the Init event fires.
Juan T. Llibre, asp.net MVP
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en español :
http://asp.net.do/foros/
======================================
"Madhur" <sd*@df.comwrote in message news:95**********************************@microsof t.com...
>I agree with David.
MasterPage class is derived from System.Web.UI.UserControl as opposed to System.Web.UI.Page.
--
Madhur
http://blogs.msdn.com/mahuja
"David Wier" <dw@dw.comwrote in message news:eu**************@TK2MSFTNGP03.phx.gbl...
>>I hate to disagree with you, but Mark is right - according to Microsoft, Masterpages become implementations of User
controls on the pages
David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no bloated markup
"jc" <jc*********@yahoo.eswrote in message
news:b0**********************************@t54g200 0hsg.googlegroups.com...
On 20 mayo, 06:22, "Mark Rae [MVP]" <m...@markNOSPAMrae.netwrote:
>>"Cirene" <cir...@nowhere.comwrote in message
news:ew**************@TK2MSFTNGP03.phx.gbl...
<snip>
>>In addition to Eliyahu's response, MasterPages are actually UserControls
anyway...
<snip>
>>IMO, MasterPages were one of the major innovations in ASP.NET 2, and I
personally never use anything else for common layout.
IMHO
Master pages are not really user control. It's really hard to debug on
user control but master page.