Custom Page Class - Parse Controls? Chain to Base Page?

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top