i have a repeater control that i am trying to use for rendering rows for a table.
<ajaxdata:repeater id="agentRepeater" runat="server" itemdataboundevent="onItemDataBound">
<headertemplate>
<table class="datatable">
<thead>
<tr>
<th>Id</th>
<th>First Name</th>
<th>Last Name</th>
</tr>
</thead>
<tbody>
</headertemplate>
<itemtemplate>
<tr>
<td><span id="idSpan"></span></td>
<td><span id="firstNameSpan"></span></td>
<td><span id="lastNameSpan"></span></td>
</tr>
</itemtemplate>
<footertemplate>
</tbody>
</table>
</footertemplate>
</ajaxdata:repeater>
Logically, it seems very simple. The expected HTML output should be:
<div id="ctl00_cph_agentRepeater" style="visibility: visible;">
<table class="datatable">
<thead>
<tr>
<th>Id</th>
<th>First Name</th>
<th>Last Name</th>
</tr>
</thead>
<tbody>
<tr>
<td><span id="ctl00_cph_agentRepeater$3$0$idSpan">1</span></td>
<td><span id="ctl00_cph_agentRepeater$3$0$firstNameSpan">Matt</span></td>
<td><span id="ctl00_cph_agentRepeater$3$0$lastNameSpan">Lehnen</span></td>
</tr>
</tbody>
</table>
</div>
However, this is what I get:
<div id="ctl00_cph_agentRepeater" style="visibility: visible;">
<table class="datatable">
<thead>
<tr>
<th>Id</th>
<th>First Name</th>
<th>Last Name</th>
</tr>
</thead>
<tbody> </tbody>
</table>
<span id="ctl00_cph_agentRepeater$3$0$idSpan">1</span>
<span id="ctl00_cph_agentRepeater$3$0$firstNameSpan">Matt</span>
<span id="ctl00_cph_agentRepeater$3$0$lastNameSpan">Lehnen</span>
</div>
The spans are rendered outside of the table and there is nothing within tbody. Am I doing something wrong?