⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.aspx

📁 前台首页:users/index.aspx 后台首页:login.aspx 这是一个有关宠物的电子商务网站 注:后台的“售后服务” 和“数据统计”这两块由于时间原因暂时 没完成。由于技术问
💻 ASPX
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="buy" %>

<!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>
     <center>
         &nbsp;<table border="0" cellpadding="0" cellspacing="0" width="900";">
         <tr>
           <td align="center" style="height: 45px; width: 891px;"><img src="image/top.jpg" width="900" id="IMG1" onclick="return IMG1_onclick() " height="100"  alt="luolili"/>
             </td>
             </tr>
             </table>
             <table>
             <tr>
             <td style="height: 24px; width: 894px;">
             <a href="index.aspx"><font color=green><b>首页</b></font></a>&nbsp;&nbsp;&nbsp;&nbsp;
             <asp:Label ID="label1" runat="server"><a href="sto.aspx"><font color=green><b>购物车</b></font></a></asp:Label>&nbsp;&nbsp;&nbsp;&nbsp;
             <asp:Label ID="label2" runat="server"><a href="shoucang.aspx"><font color=green><b>我的收藏夹</b></font></a></asp:Label>&nbsp;&nbsp;&nbsp;&nbsp;
             <asp:Label ID="label3" runat="server"><a href="petnews.aspx"><font color=green><b>宠物新闻</b></font></a></asp:Label>&nbsp;&nbsp;&nbsp;&nbsp;
             <asp:Label ID="label4" runat="server"><a href="note.aspx"><font color=green><b>留言板</b></font></a></asp:Label>&nbsp;&nbsp;&nbsp;&nbsp;
             <asp:Label ID="label6" runat="server"><a href="aboutus.aspx"><font color=green><b>关于我们</b></font></a></asp:Label>
           <asp:Label ID="label8" runat="server"><a href="../login.aspx"><font color=green><b>后台管理</b></font></a></asp:Label>
           </td>
         </tr>
    </table>
        </center>
        <center>
            &nbsp;</center>
        <center>
    <table bgcolor=red border="1">
    <tr>
    <td style="width: 900px; height: 81px;" align=left>
  
        <asp:Image ID="Image1" runat="server" Height="82px" ImageUrl="image/gou2.jpg" Width="139px" />&nbsp;  广告招商 </td>
    </tr>
    </table>
    <table style="width: 900px" border="2" id="TABLE2" onclick="return TABLE2_onclick()">
    <tr>
    <td style="width: 368px; height: 702px;" align=left valign="top">

             <br/>
            <table border="2">
            <tr>
            <th style="width: 367px; height: 20px;">
            用户登录:
            </th>
            </tr>
            </table>
                 
                     用户名<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        
                 <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="请输入" Width="52px" ControlToValidate="TextBox1"></asp:RequiredFieldValidator>
        <br />
                     密码
                 <asp:TextBox ID="TextBox2" runat="server" TextMode="Password"></asp:TextBox>

                 <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="密码不能为空" Width="62px" ControlToValidate="TextBox2"></asp:RequiredFieldValidator>
                     <br />
        <br />
  
                 验证码:
                 
                 <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>&nbsp;<br />
                     &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<asp:TextBox ID="TextBox4" runat="server" BackColor="#FF8080"
            BorderStyle="Solid" Width="71px"></asp:TextBox>&nbsp;
        <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="TextBox4"
            ControlToValidate="TextBox3" ErrorMessage="请输入验证码输入"></asp:CompareValidator><br />
        <br />
                     &nbsp; &nbsp;&nbsp;
        <asp:Label ID="Label9" runat="server" Width="161px"></asp:Label><br/>
                     <asp:Button ID="Button1" runat="server" Text="登录" Width="57px" OnClick="Button1_Click" />&nbsp;
           
                     <asp:Button ID="Button2" runat="server" Text="注册" Width="63px" OnClick="Button2_Click" CausesValidation="False" />
                      
                   
                       <br />
       
        <br/>
        <br/>
        <hr>
        <table border=2>
        <tr>
        <td style="width: 365px">
        当前在线用户:
         <asp:TextBox ID="TextBox5" runat="server" Width="78px"></asp:TextBox>&nbsp;</td>
        </tr>
        <tr>
        <td style="width: 365px">
        当前用户: &nbsp;<asp:TextBox ID="TextBox6" runat="server" Width="96px"></asp:TextBox></td>
        </tr>
        </table>
   
             <table border="2" id="TABLE3" onclick="return TABLE3_onclick()">
             <tr>
             <th style="width: 365px">最新热门文章:
             </th>
             </tr>
             <tr>
             <td style="width: 365px; height: 332px" align="left" valign="top">
             <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource2" AllowSorting="True" OnSelectedIndexChanged="GridView2_SelectedIndexChanged" AllowPaging="True" Width="270px" >
                     <Columns>
                         <asp:CommandField ShowSelectButton="True" ButtonType="Button" HeaderText="显示" SelectText="显示" />
                         <asp:BoundField DataField="title" HeaderText="title" SortExpression="title" />
                         <asp:BoundField DataField="date" HeaderText="date" SortExpression="date" />
                         <asp:BoundField DataField="click" HeaderText="click" SortExpression="click" />
                     </Columns>
                 </asp:GridView>
                 <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:EbusinessConnectionString7 %>"
                     SelectCommand="SELECT [title], [date], [click] FROM [petnews1] WHERE ([click] > @click) ORDER BY [click] DESC">
                     <SelectParameters>
                         <asp:Parameter DefaultValue="15" Name="click" Type="Int32" />
                     </SelectParameters>
                 </asp:SqlDataSource>
             </td>
             <tr>
             </table>
                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      
        <br />
        <br />
             <table border=2>
             <tr>
             <th style="width: 366px">
             广告招商:
             </th>
             </tr>
             <tr>
             <td style="width: 366px; height: 377px">
                 <asp:AdRotator ID="AdRotator1" runat="server" AdvertisementFile="~/users/ad.xml"/>
             
             </td>
             </tr>
             </table>
             <hr>
             <table border=2>
             <tr>
             <th style="width: 92px; background-color: #ffccff">
             图片欣赏
             </th>
             </tr>
             </table>
             <table border=1 style="width: 368px">
             <tr>
             <td>
             <marquee direction=left >
             <img src="dog/12.jpg" alt="gou"><img src="dog/13.jpg" alt="gou">
             <img src="dog/4.jpg" alt="gou"><img src="dog/5.jpg" alt="gou">
             
             </marquee>
             </td>
             </tr>
                    <tr>
             <td>
             <marquee direction=left >
             
             <img src="dog/7.jpg" alt="gou"><img src="dog/8.jpg" alt="gou">
             
             </marquee>
             </td>
             </tr>
              <tr>
             <td>
             <marquee direction=left ><IMG alt="gou" src="dog/14.jpg" 
            /><IMG alt="gou" src="dog/15.jpg" 
    /></marquee>
             </td>
             </tr>
    
             </table>
        </td>
     <td style="width: 510px" align="left" valign="top">  
     <table border=2>
     <tr>
     <th style="width: 536px">
     您现在的位置:<a href=index.aspx>可爱宠物网</a>>>首页
     </th>
     </tr>
     <tr>
     <td style="height: 57px">
         <asp:Button ID="Button3" runat="server" Text="查看购物车" Width="110px" CausesValidation="False" OnClick="Button3_Click" />
         <asp:Button ID="Button4" runat="server" CausesValidation="False" OnClick="Button4_Click"
             Text="查看收藏夹" /></td>
     </tr>
     <tr>
     <td>
     <asp:GridView ID="ProductView" CssClass="Text" runat="server" Width="100%" AutoGenerateColumns="False" DataKeyNames="ID" ShowHeader="False"  Height="791px" DataSourceID="SqlDataSource1" AllowPaging="True">
									<FooterStyle ForeColor="White" BackColor="#3B6BD1" Font-Bold="True"></FooterStyle>
									<SelectedRowStyle Font-Bold="True" ForeColor="Navy" BackColor="#FFCC66" BorderColor="CornflowerBlue" />
									<RowStyle ForeColor="#333333" BackColor="#FFFBD6" BorderColor="CornflowerBlue" BorderStyle="Solid" BorderWidth="1px" />
									<Columns>
										<asp:TemplateField>
											<ItemTemplate>
												<table cellpadding="2" cellspacing="0" width="100%" border="0" class="Text">
													<tr>
														<td>
															<a href='index.aspx?ID=<%# DataBinder.Eval(Container.DataItem,"ID")%>' target="_blank"><asp:Image ID="ProductPicture" Runat="server" Width="90" Height="120" ImageUrl='<%# DataBinder.Eval(Container.DataItem,"pictrue")%>'></asp:Image></a>
														</td>
														<td style="width: 100%;" valign="top">
															<table cellpadding="0" cellspacing="0" border="0" class="Text" style="width: 100%;">
																<tr><td style="width: 50%;" align="left" valign="top">
																	<table cellpadding="0" style="width: 100%;" cellspacing="0" border="0">
																			<tr>
																				<td>商品名称:<a href='someview.aspx?ID=<%# DataBinder.Eval(Container.DataItem,"id")%>' target="_blank"><%# DataBinder.Eval(Container.DataItem,"petname")%></a>
																				</td>
																			</tr>
																			<tr>
																				<td>商品价格:<asp:Label ID="Price" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"petmoney")%>'></asp:Label>
																				</td>
																			</tr>							
																		</table>
																	</td>
																	<td style="width: 50%;" align="left" valign="top">
																		<table cellpadding="0"  style="width: 100%;" cellspacing="0" border="0" class="Normal">
																			<tr>
																				<td>生产厂家:<%# DataBinder.Eval(Container.DataItem,"petlocal")%></td>
																			</tr>
																			<tr>
																				<td>生产日期:<%# DataBinder.Eval(Container.DataItem,"[date]")%></td>
																			</tr>							
																		</table>
																	</td>
																</tr>
																<tr><td colspan="2" align="left">详细介绍:<br /><%# DataBinder.Eval(Container.DataItem,"aboutpet")%></td></tr>
															    <tr><td>数量:<br /><%# DataBinder.Eval(Container.DataItem,"num")%></td></tr>
																<tr><td colspan="2" align="left"><hr size="1" /></td></tr>
																<tr><td colspan="2" align="left"><a href='someview.aspx?ID=<%# DataBinder.Eval(Container.DataItem,"ID")%>' target="_blank">
																	商品详细信息</a>&nbsp;&nbsp;&nbsp;<a href='someview.aspx?ID=<%# DataBinder.Eval(Container.DataItem,"ID")%>' target="_blank">
																	查看商品评论</a>
																	<asp:Button ID="BuyBtn" Runat="server"  Text="加入购物车" Width="80" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"id") %>' CausesValidation="False" OnClick=BuyBtn_Click></asp:Button>
																	<asp:Button ID="stoBut" Runat="server"  Text="加入收藏夹 " Width="80" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"id") %>' CausesValidation="False" OnClick=stoBut></asp:Button></td></tr>
															</table>												
														</td>
													</tr>
												</table>
											</ItemTemplate>
										</asp:TemplateField>
									</Columns>
								</asp:GridView>	
         <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:EbusinessConnectionString2 %>"
             DeleteCommand="DELETE FROM [product_info] WHERE [id] = @id" InsertCommand="INSERT INTO [product_info] ([num], [petname], [petmoney], [petlocal], [date], [aboutpet], [pictrue], [view]) VALUES (@num, @petname, @petmoney, @petlocal, @date, @aboutpet, @pictrue, @view)"
             SelectCommand="SELECT [id], [num], [petname], [petmoney], [petlocal], [date], [aboutpet], [pictrue], [view] FROM [product_info]"
             UpdateCommand="UPDATE [product_info] SET [num] = @num, [petname] = @petname, [petmoney] = @petmoney, [petlocal] = @petlocal, [date] = @date, [aboutpet] = @aboutpet, [pictrue] = @pictrue, [view] = @view WHERE [id] = @id">
             <DeleteParameters>
                 <asp:Parameter Name="id" Type="Int32" />
             </DeleteParameters>
             <UpdateParameters>
                 <asp:Parameter Name="num" Type="Int32" />
                 <asp:Parameter Name="petname" Type="String" />
                 <asp:Parameter Name="petmoney" Type="Decimal" />
                 <asp:Parameter Name="petlocal" Type="String" />
                 <asp:Parameter Name="date" Type="DateTime" />
                 <asp:Parameter Name="aboutpet" Type="String" />
                 <asp:Parameter Name="pictrue" Type="String" />
                 <asp:Parameter Name="view" Type="String" />
                 <asp:Parameter Name="id" Type="Int32" />
             </UpdateParameters>
             <InsertParameters>
                 <asp:Parameter Name="num" Type="Int32" />
                 <asp:Parameter Name="petname" Type="String" />
                 <asp:Parameter Name="petmoney" Type="Decimal" />
                 <asp:Parameter Name="petlocal" Type="String" />
                 <asp:Parameter Name="date" Type="DateTime" />
                 <asp:Parameter Name="aboutpet" Type="String" />
                 <asp:Parameter Name="pictrue" Type="String" />
                 <asp:Parameter Name="view" Type="String" />
             </InsertParameters>
         </asp:SqlDataSource>


     </td>
     </tr>
     </table>
     </td>
    </tr>
    </table>
        &nbsp;
        </center>
    </div>
    </form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -