0
我有多行的列表视图,并且在每行中我有文本框,其中是购物车和刷新按钮中的项目数。所以如果有人更改了一些项目并点击更新,我想在cookie和db中更改它。我使用CommandArgument,其中1参数是tableProduct和tableCart之间的表中的行ID,第二我想发送文本框的当前值,其中是用户想要购买多少物品,但我不知道如何添加。你能帮我吗?列表视图,发送参数到方法
<asp:TextBox runat="server" id="countInCart" Text='<%# Eval("countInCart") %>' /><asp:ImageButton ID="ImageButton1" runat="server" ImageAlign="AbsBottom" ImageUrl="~/Static/Img/inp-order-refresh.png" OnCommand="updateClick" CommandArgument='<%# Eval("id") + ";" + **here i want add value of countInCart, but I dont know how** %>' />
我发现我不能使用listview,因为我不能使用按钮里面。所以我将它更改为DataList - > http://msdn.microsoft.com/en-us/library/df6hth3s.aspx – John 2011-04-03 11:13:12