我正在从我的代码隐藏中填充一个 Listview 控件。
有谁知道我可以将css样式分配给表格单元格的方法,是说最低价格高于亚马逊价格吗?
<asp:ListView ID="lv1" runat="server" ItemPlaceholderID="itemPlaceholder" OnPagePropertiesChanging="ChangePage">
<LayoutTemplate>
<table id="dataTable">
<thead>
<tr>
<th class="t-left">Product Title</th>
<th>SKU</th>
<th>Our Price</th>
<th>Amazon Price</th>
<th>Lowest Price</th>
<th>Actions</th>
</tr>
</thead>
<tbody id="dataResults" >
<tr id="itemPlaceholder" runat="server"></tr>
</tbody>
</table>
</LayoutTemplate>
<ItemTemplate>
<tr id='<%#Eval("sku") %>'>
<td class="t-left" width="360px">
<asp:HyperLink ID="prodLnk" runat="server" NavigateUrl='<%#"~/product/editproduct.aspx?sku=" + Eval("sku") %>' ToolTip="Edit this product listing">
<asp:Label runat="server" ID="lblTitle"><%#Eval("title") %></asp:Label>
</asp:HyperLink>
</td>
<td><asp:Label runat="server" ID="lblSku"><%#Eval("sku") %></asp:Label></td>
<td><asp:Label runat="server" ID="lblTWE">£<%#Eval("twePrice") %></asp:Label></td>
<td class="amzprice-edit"><input type="text" id='<%#"txt" + Eval("sku") %>' value='<%#Eval("amzPrice") %>'> </td></td>
<td>
<asp:Label runat="server" ID="lblLow">£<%#Eval("lowprice")%></asp:Label>
<a href='<%#"lowpricedata.aspx?sku=" + Eval("sku") %>' id="lnkInfoGrpah" class="link-to info-graph" data-fancybox-type="iframe"><img src="images/icons/graph-icon.png" alt="Info" title="View Lowprice History" /></a>
</td>
<td><div class="twe-button mini update">Update</div></td>
</tr>
</ItemTemplate>
</asp:ListView>