List View, sent parameters to method
I have list view with multiple lines and in every line I have textbox where is number of items in cart and refresh button. So if someone change number of items and click on update, I wanna change it in cookie and db. Im using CommandArgument where 1 parameters is ID of row in table between tableProduct and tableCart and second i wanna sent current value of textbox, where is how many items user wanna buy, but i dont know how to add. Can u help me?
<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 valu开发者_运维技巧e of countInCart, but I dont know how** %>' />
you are looking for a way to update them in bulk. have a look at this; http://geekswithblogs.net/thanigai/archive/2009/05/21/bulk-insert-update-and-delete-with-asp.net-listview-control.aspx
精彩评论