I am attemtping to add a tabbed control to an UpdatePanel that is created during a web part's CreateChildControls function. The intention is to have a timer scroll throught the tabs displaying content until a user selects one of the tabs. The tab control work great when it is added to the web part controls. When I attempt to add the tabbed control to an update panel the web part fails to load. I can add the tabbed panel to the web part controls and I can add the update panel to the web part controls, but as soon as I try to add the tabbed control to the update panel everything goes bad.
SOURCE CODE:
protected override void CreateChildControls()
{
_updatePanel = new UpdatePanel();
_tabContainer = new TabContainer();
... //Populate a list of strings with the tab header text
foreach(String s in StringList)
{
TabPanel tp = new TabPanel();
tp.HeaderText = s;
_tabContainer.Tabs.Add(tp);
... //Populate the Tab with information
}
_updatePanel.Controls.Add(_tabContainer);
Controls.Add(_updatePanel);
}