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

📄 usermanager.aspx

📁 新闻管理后台源码,包括添加,删除,修改新闻
💻 ASPX
字号:
<%@ Page Language="C#" MasterPageFile="~/Manager.master" AutoEventWireup="true" EnableViewState ="false"  CodeFile="usermanager.aspx.cs" Inherits="usermanager" Title="用户管理" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table width="515" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr> 
    <td valign="top" style="width: 502px; height: 32px;"><img src="images/manuser.png" height="32" style="width: 632px"></td>
  </tr>
  <tr> 
    <td valign="top" style="height: 31px; width: 502px;">
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" CellPadding="4" DataSourceID="SqlDataSource2"
            ForeColor="#333333" GridLines="None" PageSize="5" Width="615px" Font-Size="12px" OnRowDataBound="GridView1_RowDataBound" DataKeyNames="USERID">
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <Columns>
                <asp:BoundField DataField="USERID" HeaderText="USERID" InsertVisible="False" ReadOnly="True"
                    SortExpression="USERID" Visible="False" />
                <asp:BoundField DataField="USERNAME" HeaderText="用户名" SortExpression="USERNAME" />
                <asp:CheckBoxField DataField="POWER" HeaderText="管理员身份" SortExpression="POWER" />
                <asp:CommandField ShowDeleteButton="True" />
            </Columns>
            <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" />
        </asp:GridView>
        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        &nbsp;&nbsp;
        <asp:SqlDataSource ID="SqlDataSource2" runat="server"
            ConnectionString="<%$ ConnectionStrings:news_manageConnectionString7 %>" DeleteCommand="DELETE FROM [t_News_User] WHERE [USERID] = @original_USERID"
            InsertCommand="INSERT INTO [t_News_User] ([USERNAME], [POWER]) VALUES (@USERNAME, @POWER)"
            OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT [USERID], [USERNAME], [POWER] FROM [t_News_User]"
            UpdateCommand="UPDATE [t_News_User] SET [USERNAME] = @USERNAME, [POWER] = @POWER WHERE [USERID] = @original_USERID">
            <DeleteParameters>
                <asp:Parameter Name="original_USERID" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="USERNAME" Type="String" />
                <asp:Parameter Name="POWER" Type="Boolean" />
                <asp:Parameter Name="original_USERID" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="USERNAME" Type="String" />
                <asp:Parameter Name="POWER" Type="Boolean" />
            </InsertParameters>
        </asp:SqlDataSource>
        &nbsp;
    </td>
  </tr>
  
</table>

</asp:Content>



⌨️ 快捷键说明

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