I have an ASP.NET ListView control (see below).
Unfortunately, when a ListView control is rendered is does so absent of HTML tags such as THEAD/TBODY.
This is causing a problem for me because the CSS styling that I'm using needs those tags.
<asp:ListView ID="ListView" runat="server" DataKeyNames="Id">
<LayoutTemplate>
<div id="tableContainer" class="tableContainer">
<table runat="server" class="scrollTable" >
<thead class="fixedHeader">
<tr>
<th>
<span>Column1</span>
</th>
</tr>
</thead>
<tbody class="scrollContent">
<tr id="itemPlaceholder" runat="server" />
</tbody>
</table>
</div>
</LayoutTemplate>
<ItemTemplate>
<tr id="items" runat="server">
<td class="first">
<%#Eval("Column1")%>
</td>
</tr>
</ItemTemplate>
</asp:ListView>
Any way I can get those tags to render?
I'm looking for a clean solution and I am open to using jQuery Prepend/Append (if possible) to achieve success.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…