J
Jeremy
I'm looking to create a custom Page class (that extends the Framework's Page
class) and I am reviewing a sample I got from MSDN Magazine (June 04). In
the sample custom Page class, they have the following method with comments
(pasted here directly from their sample). I'd like to know what their
comments mean. Specifically (1) "As controls are parsed on this page..." -
what does it mean to "parse" on the page; and (2) "don't chain to base
page..." - what does it mean to "chain to base page"?
protected override void AddParsedSubObject(object obj)
{
// As controls are parsed on this page, add them to
// our container control which we will inject into
// out template later (in OnInit)
//
_container.Controls.Add((Control)obj);
// don't chain to base page so
// that controls on this page are not added
// directly as children to the page
}
I'd like to follow best practices - which I presume they are doing here -
but I also need to understand exactly what's going on. Any explanations or
suggestions for further reading will be greatly appreciated.
Thank You.
class) and I am reviewing a sample I got from MSDN Magazine (June 04). In
the sample custom Page class, they have the following method with comments
(pasted here directly from their sample). I'd like to know what their
comments mean. Specifically (1) "As controls are parsed on this page..." -
what does it mean to "parse" on the page; and (2) "don't chain to base
page..." - what does it mean to "chain to base page"?
protected override void AddParsedSubObject(object obj)
{
// As controls are parsed on this page, add them to
// our container control which we will inject into
// out template later (in OnInit)
//
_container.Controls.Add((Control)obj);
// don't chain to base page so
// that controls on this page are not added
// directly as children to the page
}
I'd like to follow best practices - which I presume they are doing here -
but I also need to understand exactly what's going on. Any explanations or
suggestions for further reading will be greatly appreciated.
Thank You.