Hi, i am creating dinamically tabs on a TabContainer and all display and work well.
But when the you look the HTML of TabPanel have the id repeated like that:
<div id="ctl00_uxcph_body_uxtc_tabs_uxtp_es" id="ctl00_uxcph_body_uxtc_tabs_uxtp_es" class="ajax__tab_panel">
ASPX CODE OF TAB CONTAINER
This is inside an asp:Content element.
<ajaxToolkit:TabContainer ID="uxtc_tabs" runat="server" />
ASPX.CS CODE OF CREATING TABS
TabPanel tabPanel = new TabPanel();
tabPanel.ID = "uxtp_" + idioma.Abreviatura;
tabPanel.HeaderText = idioma.Nombre;
uxtc_tabs.Tabs.Add(tabPanel);
After this code, I created other controls inside the TabPanel like HtmlGenericControl, Label, TextBox, UpadePanel and RequiredFieldValidator and all works and displays fine.
Comments: Yes, I can confirm that this is still a bug in the November 2011 release. I am not creating the TabPanels dynamically at all, they are directly inside a Content control on page which uses a master page. The problem appears to be that TabContainer calls AddAttributesToRender.AddAttributesToRender (base.AddAttributesToRender) then renders the ClientID itself. The call to WebControl.AddAttributesToRender renders the ID attribute as well so the call to the base method is enough - manually rendering the client ID is a bug.
But when the you look the HTML of TabPanel have the id repeated like that:
<div id="ctl00_uxcph_body_uxtc_tabs_uxtp_es" id="ctl00_uxcph_body_uxtc_tabs_uxtp_es" class="ajax__tab_panel">
ASPX CODE OF TAB CONTAINER
This is inside an asp:Content element.
<ajaxToolkit:TabContainer ID="uxtc_tabs" runat="server" />
ASPX.CS CODE OF CREATING TABS
TabPanel tabPanel = new TabPanel();
tabPanel.ID = "uxtp_" + idioma.Abreviatura;
tabPanel.HeaderText = idioma.Nombre;
uxtc_tabs.Tabs.Add(tabPanel);
After this code, I created other controls inside the TabPanel like HtmlGenericControl, Label, TextBox, UpadePanel and RequiredFieldValidator and all works and displays fine.
Comments: Yes, I can confirm that this is still a bug in the November 2011 release. I am not creating the TabPanels dynamically at all, they are directly inside a Content control on page which uses a master page. The problem appears to be that TabContainer calls AddAttributesToRender.AddAttributesToRender (base.AddAttributesToRender) then renders the ClientID itself. The call to WebControl.AddAttributesToRender renders the ID attribute as well so the call to the base method is enough - manually rendering the client ID is a bug.