<asp:Repeater ID="Cart" runat="server" onitemcommand="Cart_ItemCommand">
<ItemTemplate>
<p class="cartline">
<span class="cartvalue cartqty"><asp:TextBox ID="cartQty" runat="server" Text='<%#Eval("shoppingCartQty")%>'></asp:TextBox></span>
<span class="cartdelete cartadjust">
<asp:HiddenField ID="cartID" value='<%#Eval("shoppingCartID") %>' runat="server" />
<asp:LinkButton ID="cartDelete" runat="server" CommandName="DeleteFromCart" CommandArgument='<%#Eval("shoppingCartID") %>'><img src="img/but-delete.png" alt="delete item" title="delete shopping cart item" /></asp:LinkButton>
</span>
</p>
</ItemTemplate>
</asp:Repeater>
<asp:LinkButton ID="cartRecalcButton" CssClass="cartrecalcbutton" runat="server" ToolTip="recalculate your shopping cart" onclick="cartRecalcButton_Click"> </asp:LinkButton>
I'm building my first site in C# and I'm stuck on how to iterate through each cartQty and update the database.
I have a stored procedure ready to update each cart row but need to pass the cartID and the cartQty. Ive tried to use foreach (Control x in this.Controls) but to no avail. HELP! (please...)