|
-
May 12th, 2005, 09:16 AM
#1
Thread Starter
Lively Member
Updating txtQuantity in a Repeater
I created a repeater to list my data inside a dataTable of Session("Cart")
however i have a problem. I cannot seem to update the Quantity.
How do i code a 'btnUpdate' so that it will read the txtQuantity and update
each row of item's quantity according to the txtQuantity.Text?
<asp:Repeater id="viewCart" runat="server">
<ItemTemplate>
<tr>
<td height="15"><%# Container.DataItem("Product") %></td>
td><%# Container.DataItem("Code") %></td>
<td><%# Double.Parse(Container.DataItem("Cost")).ToString("C") %></td>
<td align="center"><asp:TextBox ID="txtQuantity" Text='<%# Container.DataItem("Quantity") %>' ToolTip="Quantity" Width="20" MaxLength="2" runat="server" /></td>
<td>Remove</td>
</tr>
</ItemTemplate>
</asp:Repeater>
Header Codes:
Dim dtCart As DataTable
Dim drCart As DataRow
dtCart = Session("Cart")
viewCart.DataSource = dtCart.DefaultView
viewCart.DataBind()
-
How can i delete that row too?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|