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

📄 monthtotal.aspx

📁 新闻管理后台源码,包括添加,删除,修改新闻
💻 ASPX
字号:
<%@ Page Language="C#" MasterPageFile="~/GeneralUser.master" AutoEventWireup="true" CodeFile="monthTotal.aspx.cs"  EnableViewState ="false" Inherits="monthTotal" Title="分月统计" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table width="512" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr> 
    <td height="32" colspan="4" valign="top"><img src="images/houtaiguanli.png" width="512" height="32"></td>
  </tr>
  <tr> 
    <td width="128" height="57" valign="top"><div align="center">
        <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="images/wangzhanpeizhi.gif"
            PostBackUrl="~/houtaiziliao.aspx" />&nbsp;</div></td>
    <td width="128" valign="top"><div align="center">
        <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="images/jinriwenzhang.gif"
            PostBackUrl="~/todaytext.aspx" />&nbsp;</div></td>
    <td width="128" valign="top"><div align="center">
        <asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="~/images/fenyuetongji.gif"
            PostBackUrl="~/monthTotal.aspx" />&nbsp;</div></td>
    <td valign="top" style="width: 130px"><div align="center">
        <asp:ImageButton ID="ImageButton4" runat="server" ImageUrl="images/mimaxiugai.gif"
            PostBackUrl="~/Password.aspx" />&nbsp;</div></td>
  </tr>
  <tr> 
    <td valign="top" style="height: 26px"><div align="center"><font size="3" face="楷体_GB2312">
        <asp:Label ID="Label4" runat="server" Font-Names="宋体" Font-Size="12px" Text="网站配置"
            Width="54px"></asp:Label></font></div></td>
    <td valign="top" style="height: 26px"><div align="center"><font size="3" face="楷体_GB2312">
        <asp:Label ID="Label1" runat="server" Font-Names="宋体" Font-Size="12px" Text="今日文章"
            Width="54px"></asp:Label></font></div></td>
    <td valign="top" style="height: 26px"><div align="center"><font face="楷体_GB2312">
        <asp:Label ID="Label2" runat="server" Font-Names="宋体" Font-Size="12px" Text="分月统计"
            Width="54px"></asp:Label></font></div></td>
    <td valign="top" style="height: 26px; width: 130px;"><div align="center"><font face="楷体_GB2312">
        <asp:Label ID="Label3" runat="server" Font-Names="宋体" Font-Size="12px" Text="密码修改"
            Width="54px"></asp:Label></font></div></td>
  </tr>
  
</table>
    <br />
    <asp:GridView ID="GridView1" runat="server" Width="511px" CellPadding="4" ForeColor="#333333" GridLines="None" Font-Size="12px" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="NEWSID" DataSourceID="monthTotalDataSource" PageSize="5" OnRowDataBound="GridView1_RowDataBound1">
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <RowStyle BackColor="#EFF3FB" Height="25px" />
        <EditRowStyle BackColor="#2461BF" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" Height="30px" />
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="NEWSID" HeaderText="NEWSID" InsertVisible="False" ReadOnly="True"
                SortExpression="NEWSID" Visible="False" />
            <asp:BoundField DataField="NEWSTITLE" HeaderText="新闻标题" SortExpression="NEWSTITLE" />
            <asp:BoundField DataField="HITS" HeaderText="单击次数" SortExpression="HITS" />
            <asp:BoundField DataField="MONTHHITS" HeaderText="当月点击次数" SortExpression="MONTHHITS" />
            <asp:CommandField ShowDeleteButton="True" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="monthTotalDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:news_manageConnectionString %>"
        DeleteCommand="DELETE FROM [t_News] WHERE [NEWSID] = @NEWSID" InsertCommand="INSERT INTO [t_News] ([NEWSTITLE], [HITS], [MONTHHITS]) VALUES (@NEWSTITLE, @HITS, @MONTHHITS)"
        SelectCommand="SELECT [NEWSID], [NEWSTITLE], [HITS], [MONTHHITS] FROM [t_News]"
        UpdateCommand="UPDATE [t_News] SET [NEWSTITLE] = @NEWSTITLE, [HITS] = @HITS, [MONTHHITS] = @MONTHHITS WHERE [NEWSID] = @NEWSID">
        <DeleteParameters>
            <asp:Parameter Name="NEWSID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="NEWSTITLE" Type="String" />
            <asp:Parameter Name="HITS" Type="Int32" />
            <asp:Parameter Name="MONTHHITS" Type="Int32" />
            <asp:Parameter Name="NEWSID" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="NEWSTITLE" Type="String" />
            <asp:Parameter Name="HITS" Type="Int32" />
            <asp:Parameter Name="MONTHHITS" Type="Int32" />
        </InsertParameters>
    </asp:SqlDataSource>
    <br />
</asp:Content>


⌨️ 快捷键说明

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