protected override void CreateChildControls()
{
// Create the controls
Controls.Clear();
_header = new AccordionContentPanel(null, -1, AccordionItemType.Header);
Controls.Add(_header);
_content = new AccordionContentPanel(null, -1, AccordionItemType.Content);
Controls.Add(_content);
// By default, collapse the content sections so the
// page loads without flicker (the selected section
// will be expanded again in the parent Accordion's
// OnPreRender)
_content.Collapsed = true;
// Load the templates into the controls
if(_headerTemplate != null)
_headerTemplate.InstantiateIn(_header);
if(_contentTemplate != null)
_contentTemplate.InstantiateIn(_content);
}