0

<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="cart.aspx.vb" Inherits="cart" title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:GridView ID="GridView1" runat="server" BackColor="White"
BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CellPadding="3"
ForeColor="Black" GridLines="Vertical"

style="z-index: 1; left: 293px; top: 711px; position: absolute; height: 184px; width: 985px"
AutoGenerateColumns="False" DataKeyNames="OrderID"
DataSourceID="SqlDataSource1">
<Columns>
<asp:BoundField DataField="OrderID" HeaderText="OrderID" InsertVisible="False"
ReadOnly="True" SortExpression="OrderID" />
<asp:BoundField DataField="CusID" HeaderText="CusID" SortExpression="CusID" />
<asp:BoundField DataField="CusUsername" HeaderText="CusUsername"
SortExpression="CusUsername" />
<asp:BoundField DataField="ProductDesc" HeaderText="ProductDesc"
SortExpression="ProductDesc" />
<asp:BoundField DataField="TotalQuantity" HeaderText="TotalQuantity"
SortExpression="TotalQuantity" />
<asp:BoundField DataField="TotalPrice" HeaderText="TotalPrice"
SortExpression="TotalPrice" />
<asp:CommandField ButtonType="Button" SelectText="Delete"
ShowDeleteButton="True" />
</Columns>
<FooterStyle BackColor="#CCCCCC" />
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="#CCCCCC" />
</asp:GridView>
<asp:Panel ID="Panel1" runat="server" Height="196px">
</asp:Panel>
<p>
<asp:Label ID="lbltotal" runat="server" Text="Total:"></asp:Label>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:BookstoreConnectionString %>"
DeleteCommand="DELETE FROM OrderDetails WHERE (ProductDesc = @ProductDesc)"
SelectCommand="SELECT * FROM [OrderDetails]">
<DeleteParameters>
<asp:Parameter Type= "Int32" Name="ProductDesc" />
</DeleteParameters>
</asp:SqlDataSource>
</p>
<p>

</p>
</asp:Content>

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by dnanetwork
0

how can you delete anything depend on Product Description..

i guess it should be ID... !

Edited by dnanetwork: n/a

0

ooh
i changed the priductDesc to OrderID already, thx it works...

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.