Default.aspx
资源名称:WebSite1.rar [点击查看]
上传用户:vtryaojia
上传日期:2020-04-18
资源大小:1214k
文件大小:5k
源码类别:
SCSI/ASPI
开发平台:
Others
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" >
- <head runat="server">
- <title>无标题页</title>
- </head>
- <body>
- <form id="form1" runat="server">
- <div style="background-attachment: scroll; background-image: url(首页.jpg); background-repeat: repeat-y">
- <asp:Image ID="Image1" runat="server" Height="81px" Width="842px" ImageUrl="~/购物车.jpg" />
- <br />
- <asp:Label ID="Label1" runat="server" BackColor="#FFC0C0" Font-Size="Medium" Height="21px" Width="525px"></asp:Label>
- <asp:LinkButton ID="LinkButton2" runat="server" BackColor="#FFC0C0" Font-Size="Medium"
- Height="20px" PostBackUrl="~/log.aspx" Width="76px">登录</asp:LinkButton>
- <asp:LinkButton ID="LinkButton3" runat="server" BackColor="#FFC0C0" Height="20px"
- PostBackUrl="~/reg.aspx" Width="82px">注册</asp:LinkButton>
- <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
- DataSourceID="AccessDataSource1" BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Horizontal" Width="701px" OnSelectedIndexChanged="GridView1_SelectedIndexChanged1">
- <Columns>
- <asp:BoundField DataField="ID" HeaderText="序号" InsertVisible="False" ReadOnly="True"
- SortExpression="ID" />
- <asp:BoundField DataField="GoodsName" HeaderText="产品名称" SortExpression="GoodsName" />
- <asp:BoundField DataField="ClassName" HeaderText="产品类别" SortExpression="ClassName" />
- <asp:BoundField DataField="MarktePrice" HeaderText="价格(元)" SortExpression="MarktePrice" />
- <asp:BoundField DataField="GoodsNumb" HeaderText="数量" SortExpression="GoodsNumb" />
- <asp:TemplateField ShowHeader="False">
- <ItemTemplate>
- <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete"
- OnClick="LinkButton1_Click" Text="删除"></asp:LinkButton>
- </ItemTemplate>
- </asp:TemplateField>
- </Columns>
- <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
- <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
- <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
- <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
- <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
- <AlternatingRowStyle BackColor="#F7F7F7" />
- </asp:GridView>
- <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/zzu.mdb"
- SelectCommand="SELECT * FROM [SpKd]" DeleteCommand="DELETE FROM [SpKd] WHERE [ID] = ?" InsertCommand="INSERT INTO [SpKd] ([ID], [GoodsName], [ClassName], [MarktePrice], [GoodsUnit], [GoodsNumb]) VALUES (?, ?, ?, ?, ?, ?)" UpdateCommand="UPDATE [SpKd] SET [GoodsName] = ?, [ClassName] = ?, [MarktePrice] = ?, [GoodsUnit] = ?, [GoodsNumb] = ? WHERE [ID] = ?">
- <DeleteParameters>
- <asp:Parameter Name="ID" Type="Int32" />
- </DeleteParameters>
- <UpdateParameters>
- <asp:Parameter Name="GoodsName" Type="String" />
- <asp:Parameter Name="ClassName" Type="String" />
- <asp:Parameter Name="MarktePrice" Type="String" />
- <asp:Parameter Name="GoodsUnit" Type="String" />
- <asp:Parameter Name="GoodsNumb" Type="Int32" />
- <asp:Parameter Name="ID" Type="Int32" />
- </UpdateParameters>
- <InsertParameters>
- <asp:Parameter Name="ID" Type="Int32" />
- <asp:Parameter Name="GoodsName" Type="String" />
- <asp:Parameter Name="ClassName" Type="String" />
- <asp:Parameter Name="MarktePrice" Type="String" />
- <asp:Parameter Name="GoodsUnit" Type="String" />
- <asp:Parameter Name="GoodsNumb" Type="Int32" />
- </InsertParameters>
- </asp:AccessDataSource>
- <br />
- <asp:Label ID="Label2" runat="server" BackColor="#FFC0C0" Font-Overline="False" Font-Size="Large"
- ForeColor="Purple" Height="25px" Text="合 计" Width="79px"></asp:Label>
- <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
- <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="继续购物" />
- <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="付款" />
- <asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="清空购物车" Width="112px" />
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
- </div>
- </form>
- </body>
- </html>