I am trying to center the results of my ASP.Net ListView control with the rest of the items that are perfectly centered on the page. I've tried different settings but nothing seems to work. I do not want to go back to a gridview control. If I can get the listview centered it would be perfect. Here is my code below.
<asp:ListView ID="ListView1" runat="server" DataKeyNames="eid" DataSourceID="SqlDataSourc
e2">
<EmptyDataTemplate>
<table runat="server" style="">
<tr>
<td>No data was returned.</td>
</tr>
</table>
</EmptyDataTemplate>
<ItemTemplate>
<tr style="">
<%--<td>
<asp:Label ID="eidLabel" runat="server" Text='<%# Eval("eid") %>' />
</td>--%>
<td>
<asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' />
</td>
<%-- <td>
<asp:Label ID="bodypartmgLabel" runat="server" Text='<%# Eval("bodypartmg") %>' />
</td>--%>
</tr>
</ItemTemplate>
<LayoutTemplate>
<table runat="server">
<tr runat="server">
<td runat="server">
<table id="itemPlaceholderContain
er" runat="server" border="0" style="">
<tr runat="server" style="">
<%-- <th runat="server">eid</th>--%
>
<th runat="server">Exercise Name</th>
<%--<th runat="server">bodypartmg<
/th>--%>
</tr>
<tr id="itemPlaceholder" runat="server">
</tr>
</table>
</td>
</tr>
<tr runat="server">
<td runat="server" style="">
<asp:DataPager ID="DataPager1" runat="server">
<Fields>
<asp:NextPreviousPagerFiel
d ButtonType="Button" ShowFirstPageButton="True"
ShowLastPageButton="True" />
</Fields>
</asp:DataPager>
</td>
</tr>
</table>
</LayoutTemplate>
<SelectedItemTemplate>
<tr style="">
<td>
<asp:Label ID="eidLabel" runat="server" Text='<%# Eval("eid") %>' />
</td>
<td>
<asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' />
</td>
<td>
<asp:Label ID="bodypartmgLabel" runat="server" Text='<%# Eval("bodypartmg") %>' />
</td>
</tr>
</SelectedItemTemplate>
</asp:ListView>
centerlistview_results.JPG