I'm trying to get set an html attribute in a tabpanel.
Here is the tabcontainer and the first tabpanel below. I am trying to set an attribute on the <a> tag of the tabpanel. I use the tpStage.Attributes.Add("aria-selected", "true") command. This sets the attribute on a <div> tag that contains the actual content. I get why that happens, but how do I set the attribute on the <a> tag of the tabpanel instead of the content of the tabpanel? TIA
<actk:TabContainer ID="tcMain" runat="server"
OnActiveTabChanged="tcMain_ActiveTabChanged"
AutoPostBack="true" CssClass="MyTabStyle" role="tablist">
<actk:TabPanel HeaderText="Stage"
runat="server" ID="tpStage" AccessKey="2">
<HeaderTemplate>
Stage
</HeaderTemplate>
<ContentTemplate>
The result html is:
| <div id="ContentPlaceHolder1_tcMain" class="MyTabStyle" role="tablist" style="visibility:hidden;"> | |
| <div id="ContentPlaceHolder1_tcMain_header"class="ajax__tab_header"> | |
| <span id="ContentPlaceHolder1_tcMain_tpStage_tab"class="ajax__tab"><spanclass="ajax__tab_outer"><spanclass="ajax__tab_inner"><aclass="ajax__tab_tab"id="__tab_ContentPlaceHolder1_tcMain_tpStage"href="#"style="text-decoration:none;"><span> | |
| Stage | |
| </span></a></span></span></span><spanid="ContentPlaceHolder1_tcMain_tpIssues_tab"class="ajax__tab"><spanclass="ajax__tab_outer"><spanclass="ajax__tab_inner"><aclass="ajax__tab_tab"id="__tab_ContentPlaceHolder1_tcMain_tpIssues"href="#"style="text-decoration:none;"><span> | |
| Issues | |
| </span></a></span></span></span><spanid="ContentPlaceHolder1_tcMain_tpMonitoring_tab"class="ajax__tab"><spanclass="ajax__tab_outer"><spanclass="ajax__tab_inner"><aclass="ajax__tab_tab"id="__tab_ContentPlaceHolder1_tcMain_tpMonitoring"href="#"style="text-decoration:none;"><span> | |
| Monitoring | |
| </span></a></span></span></span><spanid="ContentPlaceHolder1_tcMain_tpStatus_tab"class="ajax__tab"><spanclass="ajax__tab_outer"><spanclass="ajax__tab_inner"><aclass="ajax__tab_tab"id="__tab_ContentPlaceHolder1_tcMain_tpStatus"href="#"style="text-decoration:none;"><span> | |
| Status | |
| </span></a></span></span></span><spanid="ContentPlaceHolder1_tcMain_tpRecipient_tab"class="ajax__tab"><spanclass="ajax__tab_outer"><spanclass="ajax__tab_inner"><aclass="ajax__tab_tab"id="__tab_ContentPlaceHolder1_tcMain_tpRecipient"href="#"style="text-decoration:none;"><span> | |
| Recipient | |
| </span></a></span></span></span><spanid="ContentPlaceHolder1_tcMain_tpContacts_tab"class="ajax__tab"><spanclass="ajax__tab_outer"><spanclass="ajax__tab_inner"><aclass="ajax__tab_tab"id="__tab_ContentPlaceHolder1_tcMain_tpContacts"href="#"style="text-decoration:none;"><span> | |
| Contacts | |
| </span></a></span></span></span><spanid="ContentPlaceHolder1_tcMain_tpComplainant_tab"class="ajax__tab"><spanclass="ajax__tab_outer"><spanclass="ajax__tab_inner"><aclass="ajax__tab_tab"id="__tab_ContentPlaceHolder1_tcMain_tpComplainant"href="#"style="text-decoration:none;"><span> | |
| Complainant | |
| </span></a></span></span></span><spanid="ContentPlaceHolder1_tcMain_tpOCRStaff_tab"class="ajax__tab"><spanclass="ajax__tab_outer"><spanclass="ajax__tab_inner"><aclass="ajax__tab_tab"id="__tab_ContentPlaceHolder1_tcMain_tpOCRStaff"href="#"style="text-decoration:none;"><span> | |
| OCR Staff | |
| </span></a></span></span></span> | |
| </div><divid="ContentPlaceHolder1_tcMain_body"class="ajax__tab_body"style="display:block;"> | |
| <div id="ContentPlaceHolder1_tcMain_tpStage"accesskey="2"aria-selected="true"class="ajax__tab_panel"> |