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

📄 admin.aspx

📁 用c# asp.net 编写b/s模式的管理系统
💻 ASPX
字号:
<%@ page language="C#" autoeventwireup="true" inherits="admin, App_Web_xtvwqxfv" %>

<!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 bgcolor="silver">
    <form id="form1" runat="server">
    <div style="background-color: silver">
        <div style="z-index: 104; left: 56px; width: 904px; position: absolute; top: 19px;
            height: 47px; border-bottom: black thick solid;">
            <asp:Label ID="Label9" runat="server" Style="left: 19px; position: absolute; top: 19px"
                Text="欢迎:"></asp:Label>
            <asp:Label ID="Label10" runat="server" Font-Names="方正行楷简体" Font-Size="X-Large" Style="left: 65px;
                position: absolute; top: 14px" Width="20px"></asp:Label>
            <asp:HyperLink ID="HyperLink1" runat="server" Style="left: 288px; position: absolute;
                top: 17px" Width="128px" Font-Names="方正行楷简体">【修改个人资料】</asp:HyperLink>
            <asp:HyperLink ID="HyperLink2" runat="server" Font-Names="方正行楷简体" Style="left: 449px;
                position: absolute; top: 17px" NavigateUrl="~/classmanager.aspx">【办公用品类别管理】</asp:HyperLink>
            <asp:HyperLink ID="HyperLink3" runat="server" Font-Names="方正行楷简体" Style="left: 642px;
                position: absolute; top: 17px" NavigateUrl="~/adminkucun.aspx">【办公用品管理】</asp:HyperLink>
            <asp:Label ID="Label13" runat="server" Style="left: 169px; position: absolute; top: 20px"
                Text="回来"></asp:Label>
        </div>
        <div style="z-index: 103; left: 69px; width: 211px; position: absolute; top: 89px;
            height: 475px; border-right: black thin solid; border-top: black thin solid; border-left: black thin solid; border-bottom: black thin solid;">
            <asp:Image ID="Image1" runat="server" Height="114px" Style="z-index: 100; left: 48px;
                position: absolute; top: 9px" Width="101px" />
            <div style="z-index: 101; left: 11px; width: 190px; position: absolute; top: 129px;
                height: 329px; border-top: black thin solid;">
                <asp:Label ID="Label1" runat="server" Style="left: 9px; position: absolute; top: 8px"
                    Text="姓名:" Font-Names="方正行楷简体"></asp:Label>
                <asp:Label ID="Label2" runat="server" Style="left: 9px; position: absolute; top: 45px"
                    Text="性别:" Font-Names="方正行楷简体"></asp:Label>
                <asp:Label ID="Label3" runat="server" Style="left: 9px; position: absolute; top: 81px"
                    Text="年龄:" Font-Names="方正行楷简体"></asp:Label>
                <asp:Label ID="Label4" runat="server" Style="left: 9px; position: absolute; top: 154px"
                    Text="个性签名:" Font-Names="方正行楷简体"></asp:Label>
                <asp:Label ID="Label5" runat="server" Font-Names="方正行楷简体" Style="left: 52px; position: absolute;
                    top: 6px" Width="107px"></asp:Label>
                <asp:Label ID="Label6" runat="server" Font-Names="方正行楷简体" Style="left: 52px; position: absolute;
                    top: 43px" Width="107px"></asp:Label>
                <asp:Label ID="Label7" runat="server" Font-Names="方正行楷简体" Style="left: 52px; position: absolute;
                    top: 80px" Width="107px"></asp:Label>
                <asp:Label ID="Label8" runat="server" Font-Names="方正行楷简体" Height="115px" Style="left: 11px;
                    position: absolute; top: 184px; border-top: black thin solid; border-bottom: black thin solid; border-left: black thin solid; border-right: black thin solid;" Width="169px"></asp:Label>&nbsp;
                <asp:Label ID="Label11" runat="server" Style="left: 9px; position: absolute; top: 118px"
                    Text="级别:" Font-Names="方正行楷简体"></asp:Label>
                <asp:Label ID="Label12" runat="server" Style="left: 52px; position: absolute; top: 117px"
                    Width="107px" Font-Names="方正行楷简体"></asp:Label>
            </div>
        </div>
        <div style="z-index: 105; left: 320px; width: 586px; position: absolute; top: 84px;
            height: 705px; border-left: black thin solid;">
            &nbsp;
        &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px"
                CellPadding="3" DataKeyNames="账号" DataSourceID="SqlDataSource1" ForeColor="Black"
                GridLines="Vertical" Style="position: absolute; left: 41px; top: 60px; z-index: 100; border-collapse: separate;" Width="523px">
                <FooterStyle BackColor="#CCCCCC" />
                <Columns>
                    <asp:CommandField ButtonType="Button" CausesValidation="False" ShowDeleteButton="True"
                        ShowEditButton="True">
                        <ControlStyle Width="40px" />
                        <ItemStyle Width="100px" />
                    </asp:CommandField>
                    <asp:BoundField DataField="账号" HeaderText="账号" ReadOnly="True" SortExpression="账号">
                        <ControlStyle Width="60px" />
                        <ItemStyle Width="60px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="密码" HeaderText="密码" SortExpression="密码">
                        <ControlStyle Width="60px" />
                        <ItemStyle Width="60px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="级别" HeaderText="级别" SortExpression="级别">
                        <ControlStyle Width="60px" />
                        <ItemStyle Width="60px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="在线" HeaderText="在线" SortExpression="在线">
                        <ControlStyle Width="40px" />
                        <ItemStyle Width="40px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="邮箱" HeaderText="邮箱" SortExpression="邮箱">
                        <ControlStyle Width="160px" />
                        <ItemStyle Width="160px" />
                    </asp:BoundField>
                </Columns>
                <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="#CCCCCC" />
            </asp:GridView>
            <asp:Label ID="Label14" runat="server" Font-Names="方正行楷简体" Font-Size="Large" Style="left: 215px;
                position: absolute; top: 16px; z-index: 101;" Text="【用户管理】" Width="159px"></asp:Label>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues"
                ConnectionString="<%$ ConnectionStrings:mmConnectionString %>" DeleteCommand="DELETE FROM [账号信息] WHERE [账号] = @original_账号 AND [邮箱] = @original_邮箱 AND [密码] = @original_密码 AND [在线] = @original_在线 AND [级别] = @original_级别"
                InsertCommand="INSERT INTO [账号信息] ([账号], [邮箱], [密码], [在线], [级别]) VALUES (@账号, @邮箱, @密码, @在线, @级别)"
                OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT [账号], [邮箱], [密码], [在线], [级别] FROM [账号信息]"
                UpdateCommand="UPDATE [账号信息] SET [邮箱] = @邮箱, [密码] = @密码, [在线] = @在线, [级别] = @级别 WHERE [账号] = @original_账号 AND [邮箱] = @original_邮箱 AND [密码] = @original_密码 AND [在线] = @original_在线 AND [级别] = @original_级别">
                <DeleteParameters>
                    <asp:Parameter Name="original_账号" Type="String" />
                    <asp:Parameter Name="original_邮箱" Type="String" />
                    <asp:Parameter Name="original_密码" Type="String" />
                    <asp:Parameter Name="original_在线" Type="String" />
                    <asp:Parameter Name="original_级别" Type="String" />
                </DeleteParameters>
                <UpdateParameters>
                    <asp:Parameter Name="邮箱" Type="String" />
                    <asp:Parameter Name="密码" Type="String" />
                    <asp:Parameter Name="在线" Type="String" />
                    <asp:Parameter Name="级别" Type="String" />
                    <asp:Parameter Name="original_账号" Type="String" />
                    <asp:Parameter Name="original_邮箱" Type="String" />
                    <asp:Parameter Name="original_密码" Type="String" />
                    <asp:Parameter Name="original_在线" Type="String" />
                    <asp:Parameter Name="original_级别" Type="String" />
                </UpdateParameters>
                <InsertParameters>
                    <asp:Parameter Name="账号" Type="String" />
                    <asp:Parameter Name="邮箱" Type="String" />
                    <asp:Parameter Name="密码" Type="String" />
                    <asp:Parameter Name="在线" Type="String" />
                    <asp:Parameter Name="级别" Type="String" />
                </InsertParameters>
            </asp:SqlDataSource>
            <div style="z-index: 102; left: 41px; width: 527px; position: absolute; top: 432px;
                height: 232px; border-bottom: black thin solid;">
                <asp:Label ID="Label15" runat="server" Style="left: 7px; position: absolute; top: 8px"
                    Text="添加用户:" Font-Names="方正行楷简体"></asp:Label>
                <asp:TextBox ID="TextBox1" runat="server" Style="left: 84px; position: absolute;
                    top: 7px" Width="109px"></asp:TextBox>
                <asp:Label ID="Label16" runat="server" Font-Names="方正行楷简体" Style="left: 39px; position: absolute;
                    top: 43px" Text="密码:"></asp:Label>
                <asp:TextBox ID="TextBox2" runat="server" Style="left: 84px; position: absolute;
                    top: 42px" TextMode="Password" Width="109px"></asp:TextBox>
                <asp:Label ID="Label17" runat="server" Font-Names="方正行楷简体" Style="left: 39px; position: absolute;
                    top: 113px" Text="邮箱:"></asp:Label>
                <asp:TextBox ID="TextBox3" runat="server" Style="left: 84px; position: absolute;
                    top: 112px" Width="172px"></asp:TextBox>
                <asp:Label ID="Label18" runat="server" Font-Names="方正行楷简体" Style="left: 39px; position: absolute;
                    top: 150px" Text="级别:"></asp:Label>
                <asp:TextBox ID="TextBox4" runat="server" Style="left: 84px; position: absolute;
                    top: 149px" Width="80px"></asp:TextBox>
                <asp:Button ID="Button3" runat="server" Font-Names="方正行楷简体" OnClick="Button3_Click"
                    Style="left: 42px; position: absolute; top: 191px" Text="添加用户" Width="137px" />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1"
                    ErrorMessage="用户不能为空" Style="left: 212px; position: absolute; top: 11px"></asp:RequiredFieldValidator>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2"
                    ErrorMessage="密码不能为空" Style="left: 212px; position: absolute; top: 45px"></asp:RequiredFieldValidator>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox4"
                    ErrorMessage="级别不能为空" Style="left: 221px; position: absolute; top: 150px"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBox3"
                    ErrorMessage="邮箱格式错误" Style="left: 275px; position: absolute; top: 116px" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                <asp:Label ID="Label19" runat="server" Font-Names="方正行楷简体" Style="left: 7px; position: absolute;
                    top: 78px" Text="确认密码:"></asp:Label>
                <asp:TextBox ID="TextBox5" runat="server" Style="left: 84px; position: absolute;
                    top: 77px" TextMode="Password" Width="109px"></asp:TextBox>
                <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="TextBox2"
                    ControlToValidate="TextBox5" ErrorMessage="密码不一致" Style="left: 212px; position: absolute;
                    top: 77px"></asp:CompareValidator>
                <asp:Label ID="Label20" runat="server" Style="left: 350px; position: absolute; top: 11px"
                    Text="长度最多20个字符" Width="136px"></asp:Label>
                <asp:Label ID="Label21" runat="server" Style="left: 352px; position: absolute; top: 43px"
                    Text="长度最多12个字符"></asp:Label>
                <asp:Label ID="Label22" runat="server" ForeColor="Red" Style="left: 225px; position: absolute;
                    top: 9px" Width="88px"></asp:Label>
            </div>
        </div>
        &nbsp;
        <div style="z-index: 106; left: 70px; width: 211px; position: absolute; top: 588px;
            height: 168px">
        </div>
    </div>
    </form>
</body>
</html>

⌨️ 快捷键说明

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