DataList is outside the table
I want to put a DataList in table but my DataList shows outside the table... I don't understand why.
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
<table class="four_tile_table" border="1" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
开发者_C百科 <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1"
RepeatDirection="Horizontal" RepeatColumns="2" CellPadding="0">
</asp:DataList>
</tr>
</tbody>
</table>
</asp:Content>
I have the same behavior with the ContentPlaceHolder in my MasterPage, if I put it inside a table, it shows outside.
Thank you
I am not sure what do you mean by you are seeing it outside the table. But onething is you are missing
< td>
tags in your table layout.
Try wrapping the <asp:DataList>
with a <td></td>
精彩评论