这样,
<table id="table3" cellpadding="1" cellspacing="1" border="1">
<tr>
<td width="220">
<asp:LinkButton ID="lbtCartBookName" runat="server" CommandName="viewBook"
Text='<%#DataBinder.Eval(Container.DataItem,"BookName") %>'
CommandArgument='<%#DataBinder.Eval(Container.DataItem,"BookID") %>'>
</asp:LinkButton>
</td>
<td width="90"><%#DataBinder.Eval(Container.DataItem,"Price") %></td>
<td width="90"><%#DataBinder.Eval(Container.DataItem,"DiscountPrice") %></td>
<td width="90">
<asp:TextBox ID="tbQuantity" runat="server" Width="60"
Text='<%#DataBinder.Eval(Container.DataItem,"Quantity") %>'>
</asp:TextBox>
</td>
<td width="100"><%#DataBinder.Eval(Container.DataItem,"totalPrice") %></td>
<td width="100"><%#DataBinder.Eval(Container.DataItem, "totalDiscountPrice")%></td>
<td width="65">
<asp:LinkButton ID="lbtModifyQtt" CommandName="modifyQuantity" Text="修改数量"
CommandArgument='<%#DataBinder.Eval(Container.DataItem,"BookID") %>' runat="server" >
</asp:LinkButton>
</td>
.......................
绑定的数据有8、9个control,你知道是哪个吗。除非用循环,但感觉很笨。不知谁有更灵活的办法。请教。谢谢!