我希望有边界的表格在列表视图中显示。 我在列表视图中使用了 html 表格, 但我无法获得边界线( rows) 和 列 ( triged 边框= “ 2 ” ) 。 我试图使用 cs 来获取边界, 但我无法获取表格行 。
代码 :
<asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1">
<LayoutTemplate>
<table id="Table1" border="2" runat="server" class="TableCSS">
<tr id="Tr1" runat="server" class="TableHeader">
<td id="Td1" runat="server">OwnedBy </td>
<td id="Td2" runat="server">Sharedclass </td>
<td id="Td3" runat="server">EffectiveInterest </td>
<td id="Td4" runat="server">DeemedInterest </td>
</tr>
<tr id="ItemPlaceholder" runat="server">
</tr>
</table>
</LayoutTemplate>
<asp:listview>
css:
.TableCSS
{
border-bottom-width:thin;
border-left-width:thin;
border-bottom-color:Black;
background-color:Red;
width:auto;
}
.TableHeader
{
border:12px;
background-color:black;
color:Snow;
font-size:11px;
font-family:Verdana;
height:auto;
text-align:center;
}