The TabPanel is generating double ID attributes in the same span tag as shown in the example below extracted from http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/Tabs/Tabs.aspx
<div id="ctl00_SampleContent_Tabs_Panel1" id="ctl00_SampleContent_Tabs_Panel1" class="ajax__tab_panel">
I noticed that the TabPanel Render(HtmlTextWriter writer) method is calling the base.AddAttributesToRender(writer) and afterwards calls the writer.AddAttribute method to add ID which has been added by the base control. Commenting line 266 in TabPanel.cs solves the problem.
Another issue with double attributes occurs also when the TabPanel CssClass property is set. This can be handled at rendering stage as follows allow the base control to render the class attribute:
protected override void Render(HtmlTextWriter writer) {
if (_headerControl != null) {
_headerControl.Visible = false;
}
if (string.IsNullOrWhiteSpace(CssClass))
CssClass = "ajax__tab_panel";
else
CssClass = (CssClass + " ajax__tab_panel").Trim();
base.AddAttributesToRender(writer);
//writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID);
//writer.AddAttribute(HtmlTextWriterAttribute.Class, "ajax__tab_panel");
if (!Active || !Enabled) {
writer.AddStyleAttribute(HtmlTextWriterStyle.Display, "none");
writer.AddStyleAttribute(HtmlTextWriterStyle.Visibility, "hidden");
}
writer.RenderBeginTag(HtmlTextWriterTag.Div);
RenderChildren(writer);
writer.RenderEndTag();
ScriptManager.RegisterScriptDescriptors(this);
}
Comments: The issue is fixed and the fix is included in the future release. Related changeset: [d5d1746](https://ajaxcontroltoolkit.codeplex.com/SourceControl/changeset/d5d1746976056e8866e4337a385ff0aa3e5493f8)
<div id="ctl00_SampleContent_Tabs_Panel1" id="ctl00_SampleContent_Tabs_Panel1" class="ajax__tab_panel">
I noticed that the TabPanel Render(HtmlTextWriter writer) method is calling the base.AddAttributesToRender(writer) and afterwards calls the writer.AddAttribute method to add ID which has been added by the base control. Commenting line 266 in TabPanel.cs solves the problem.
Another issue with double attributes occurs also when the TabPanel CssClass property is set. This can be handled at rendering stage as follows allow the base control to render the class attribute:
protected override void Render(HtmlTextWriter writer) {
if (_headerControl != null) {
_headerControl.Visible = false;
}
if (string.IsNullOrWhiteSpace(CssClass))
CssClass = "ajax__tab_panel";
else
CssClass = (CssClass + " ajax__tab_panel").Trim();
base.AddAttributesToRender(writer);
//writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID);
//writer.AddAttribute(HtmlTextWriterAttribute.Class, "ajax__tab_panel");
if (!Active || !Enabled) {
writer.AddStyleAttribute(HtmlTextWriterStyle.Display, "none");
writer.AddStyleAttribute(HtmlTextWriterStyle.Visibility, "hidden");
}
writer.RenderBeginTag(HtmlTextWriterTag.Div);
RenderChildren(writer);
writer.RenderEndTag();
ScriptManager.RegisterScriptDescriptors(this);
}
Comments: The issue is fixed and the fix is included in the future release. Related changeset: [d5d1746](https://ajaxcontroltoolkit.codeplex.com/SourceControl/changeset/d5d1746976056e8866e4337a385ff0aa3e5493f8)