📄 addusertorole.aspx
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddUserToRole.aspx.cs" Inherits="AddUserToRole" %>
<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="lbUser" runat="server" Text="User:"></asp:Label>
<asp:DropDownList ID="dwnUser" runat="server" AutoPostBack="True" OnSelectedIndexChanged="dwnUser_SelectedIndexChanged">
</asp:DropDownList>
<asp:Label ID="Label2" runat="server" Text="Role:"></asp:Label>
<asp:DropDownList ID="dwnRole" runat="server">
</asp:DropDownList><br />
<asp:Button ID="btnAddUserToRole" runat="server" Text="加入角色(一对一)" OnClick="btnAddUserToRole_Click" BackColor="#FFE0C0" />
<asp:Button ID="btnRemoveUserRole" runat="server" OnClick="btnRemoveUserRole_Click"
Text="将用户自角色中移除" BackColor="#C0C0FF" /><br />
<br />
<asp:GridView ID="gviewUserRoles" runat="server" BackColor="LightGoldenrodYellow" BorderColor="Tan"
BorderWidth="1px" CellPadding="2" ForeColor="Black" GridLines="None" Width="150px" AutoGenerateColumns="False" Font-Size="10pt">
<FooterStyle BackColor="Tan" />
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<AlternatingRowStyle BackColor="PaleGoldenrod" />
<Columns>
<asp:TemplateField HeaderText="角色">
<ItemTemplate>
<%# Container.DataItem.ToString() %>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
<asp:Label ID="txtMsg" runat="server"></asp:Label>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -