To summarize, this templating scheme provides you strongly-typed properties, such as page title, stylesheet, and the server-side form, as well as several PlaceHolder
controls to enable the page developer to programmatically add controls to various places on the page's control tree. It automatically adds all controls to the server-side form to enable them to participate in ASP.NET's object-oriented postback processing and view state. By intercepting the AddParsedSubObject
method and adding the objects to a temporary control collection, it enables view state for all controls added to the tree in the template.
This scheme also allows the developer to create as many sub-templates from this template as desired by creating similar template classes that derive from this one. It has been tested on a major intranet project and is being used on this site. On these, performance impact is minimal, and usability for the page developers on my team has proven to be good.
Overall, for postback-intensive applications, I think this scheme or some variation of it is the best solution for page templating. The only difficulties I have found with it are accounting for multiple default buttons and providing full design-time support, both of which have workable remedies.