- 分享
- 0
- 人气
- 0
- 主题
- 13
- 帖子
- 57
- UID
- 296844
- 积分
- 1577
- 阅读权限
- 19
- 注册时间
- 2010-1-29
- 最后登录
- 2016-6-16
- 在线时间
- 424 小时
|
回复 4# 小恶魔J@YL()NG
<ASP: DataList id="MyDataList" DataSourceID="SqlDataSource1" RepeatColumns="2"
runat="server" DataKeyField="itemid">
<ItemTemplate>
<table cellpadding=10 style="font: 10pt verdana">
<tr>
<td width=1 bgcolor="BD8672"/>
<td valign="top">
<img alt="image" align="top" src="<%# Eval("itemid", "Images/{0}.gif") %>"/ >
<img alt="abc" border="0" src="Image/{0}.gif<%#Eval("itemid") %>" />
</td>
<td valign="top">
<b>Item ID : </b><%# DataBinder.Eval(Container.DataItem, "itemid") %><br>
<b>Category: </b><%# DataBinder.Eval(Container.DataItem, "category") %><br>
<b>Price: </b><%# DataBinder.Eval(Container.DataItem, "sellingcost", "$ {0}") %>
<p>
</td>
</tr>
</table>
</ItemTemplate>
</ASP: DataList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:InventoryConnectionString %>"
SelectCommand="SELECT [no], [itemid], [category], [sellingcost] FROM [Item]">
</asp:SqlDataSource> |
|