Posted on 2007-04-22 22:10
停留的风 阅读(1862)
评论(4) 编辑 收藏 所属分类:
.NET技巧特辑
<ASP:DataList id="MyDataList" RepeatColumns="2" OnEditCommand="MyDataList_Edit" OnUpdateCommand="MyDataList_Update" OnCancelCommand="MyDataList_Cancel" runat="server">
<ItemTemplate>
<table cellpadding=10 style="font: 10.5pt 宋体">
<tr>
<td width=1 bgcolor="BD8672"/>
<td valign="top">
<b>书名:</b><%# DataBinder.Eval(Container.DataItem, "eat_name") %><br>
<asp:linkbutton CommandName="edit" runat="server" ID="Linkbutton1" NAME="Linkbutton1">
<b>名称:</b><%# DataBinder.Eval(Container.DataItem, "eat_name") %>
</asp:linkbutton>
</td>
</tr>
</table>
</ItemTemplate>
<EditItemTemplate>
<table cellpadding=10 style="font: 10.5pt 宋体">
<tr>
<td width=1 bgcolor="BD8672"/>
<td valign="top">
<img align="top" src='<%# DataBinder.Eval(Container.DataItem, "eat_id") %>' >
</td>
<td valign="top">
<b>书名:</b><%# DataBinder.Eval(Container.DataItem, "eat_name") %><br>
<b>类别:</b><%# DataBinder.Eval(Container.DataItem, "eat_name") %><br>
<b>出版商 ID:</b><%# DataBinder.Eval(Container.DataItem, "eat_name") %><br>
<b>价格:</b><asp:TextBox id="edit_price" text='<%# DataBinder.Eval(Container.DataItem, "eat_name") %>' runat="server" />
<p>
<asp:linkbutton CommandName="update" runat="server" ID="Linkbutton2" NAME="Linkbutton2"><img border="0" src="..//images/update_book.gif" ></asp:linkbutton>
<asp:linkbutton CommandName="cancel" runat="server" ID="Linkbutton3" NAME="Linkbutton3"><img border="0" src="..//images/cancel_book.gif" ></asp:linkbutton>
</td>
</tr>
<tr>
<td colspan="2" style="padding-top:15" align="center">
<span id="Span1" EnableViewState="false" style="font: arial 11pt;" runat="server" />
</td>
</tr>
</table>
</EditItemTemplate>
</ASP:DataList>