How to instantiate templates (properly)
Something for myself to bookmark. Here is a really good article describing the right way to instantiate templates in asp.net controls.
Every time a control is added to a parent control the child control will immediately “catch up” to the lifecycle point of the parent control. The control lifecycle includes the familiar Init, Load, PreRender, and a number of other lifecycle stages related to state management. When a template is instantiated through a call to InstantiateIn, all that happens (typically) is that the controls in the template are instantiated one by one, and added to the container that you passed in to InstantiateIn, again one by one.
How to instantiate templates (properly)
I also subscribed to the blog and waiting for more good articles.
No comments yet. Be the first.
Leave a reply