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

📄 news.aspx

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

<!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="850";">
         <tr>
           <td align="center" style="height: 45px; width: 849px;"><img src="users/image/top.jpg" id="IMG1" onclick="return IMG1_onclick() " height="100"  alt="luolili" style="width: 823px"/>
             </td>
             </tr>
             </table>
             <table>
             <tr>
             <td style="height: 24px; width: 826px;">
     
             <a href=admin.aspx><font size=4><i>后台管理首页</i></font></a> 
         <a href=adminuser.aspx><font size=4><i>用户管理</i></font></a>
         <a href=adminproduct.aspx><font size=4><i>产品管理</i></font></a>
         <a href=order.aspx><font size=4><i>订单管理</i></font></a>
        <a href=service.aspx><font size=4><i>售后服务</i></font></a>
         <a href=admindata.aspx><font size=4><i>数据统计</i></font></a>
         <a href=news.aspx><font size=4><i>新闻管理</i></font></a>
           </td>
         </tr>
    </table>
    
           <table style="width: 530px">
         <tr>
         <td>
             &nbsp; &nbsp; &nbsp; &nbsp;您当前位置:<a href=admin.aspx>后台管理首页</a> >><a href=news.aspx>新闻管理</a>
         </td>
         </tr>
         </table></center>
    <center>
    <h1>
    文章列表
    </h1>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
            CellPadding="4" DataKeyNames="id" DataSourceID="SqlDataSource1" ForeColor="#333333"
            GridLines="None" Height="390px" Width="777px">
            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <Columns>
                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ButtonType="Button" />
                <asp:BoundField DataField="title" HeaderText="标题" SortExpression="title" />
                <asp:BoundField DataField="id" HeaderText="编号" InsertVisible="False" ReadOnly="True"
                    SortExpression="id" />
                <asp:BoundField DataField="Auth" HeaderText="作者" SortExpression="Auth" />
                <asp:BoundField DataField="date" HeaderText="发表日期" SortExpression="date" />
                <asp:TemplateField HeaderText="显示">
                <ItemTemplate>
                 <asp:Button runat=server ID="statu" Text="显示文章" OnClick="btuclick" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"id") %>'></asp:Button>
                </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=.;Initial Catalog=Ebusiness;User ID=sa"
            DeleteCommand="DELETE FROM [petnews1] WHERE [id] = @id" InsertCommand="INSERT INTO [petnews1] ([title], [Auth], [date]) VALUES (@title, @Auth, @date)"
            SelectCommand="SELECT [title], [id], [Auth], [date] FROM [petnews1]" UpdateCommand="UPDATE [petnews1] SET [title] = @title, [Auth] = @Auth, [date] = @date WHERE [id] = @id">
            <DeleteParameters>
                <asp:Parameter Name="id" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="title" Type="String" />
                <asp:Parameter Name="Auth" Type="String" />
                <asp:Parameter Name="date" Type="DateTime" />
                <asp:Parameter Name="id" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="title" Type="String" />
                <asp:Parameter Name="Auth" Type="String" />
                <asp:Parameter Name="date" Type="DateTime" />
            </InsertParameters>
        </asp:SqlDataSource>
    </center>
        <center>
            &nbsp;</center>
        <center>
        <table border="1">
        <tr>
        <td>
         <asp:TextBox ID="TextBox1" runat="server" Width="360px"></asp:TextBox><br />
        <br /> 
        </td>
        </tr>
        <tr>
        <td>
        <table border=1 style="width: 780px">
        <tr>
        <td style="width: 122px" align="center" valign="middle">
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;
            &nbsp; &nbsp;<br />
            作者:</td>
        <td>
            <asp:TextBox ID="TextBox3" runat="server" Width="87px"></asp:TextBox></td>
        <td style="width: 116px">
            &nbsp;文章来源:</td>
        <td>
            <asp:TextBox ID="TextBox2" runat="server" Width="84px"></asp:TextBox></td>
        <td style="width: 85px">
        点击数:</td>
        <td style="width: 98px">
            <asp:TextBox ID="TextBox4" runat="server" Width="58px"></asp:TextBox></td>
        <td style="width: 103px">
        更新时间:</td>
        <td style="width: 172px">
            <asp:TextBox ID="TextBox5" runat="server" Width="93px"></asp:TextBox></td>
        </tr>
        </table>  
       
        <table>
        <tr>
        <td style="width: 775px; height: 451px;">
         <asp:TextBox ID="TextBox6" runat="server" Width="703px"  TextMode="MultiLine" Height="354px"></asp:TextBox>       
        </td>
        </tr>
        </table>
        </td>
        </tr>
        </table>
        </center>
    </div>
    </form>
</body>
</html>

⌨️ 快捷键说明

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