getrolesforuser.aspx
来自「《圣殿祭司的ASP.NET 2.0开发详解——使用C#》光盘内容.包含了书籍所含」· ASPX 代码 · 共 38 行
ASPX
38 行
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GetRolesForUser.aspx.cs" Inherits="GetRolesForUser" %>
<!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="请选择用户:"></asp:Label>
<asp:DropDownList ID="dwnUsers" runat="server" OnSelectedIndexChanged="dwnUsers_SelectedIndexChanged" AutoPostBack="True">
</asp:DropDownList>
<br />
<asp:Label ID="lbRoles" runat="server"></asp:Label><br />
<asp:GridView ID="gviewRoles" runat="server" AutoGenerateColumns="False" BackColor="LightGoldenrodYellow"
BorderColor="Tan" BorderWidth="1px" CellPadding="2" ForeColor="Black" GridLines="None"
Width="150px">
<FooterStyle BackColor="Tan" />
<Columns>
<asp:TemplateField HeaderText="角色">
<ItemTemplate>
<%# Container.DataItem.ToString() %>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<AlternatingRowStyle BackColor="PaleGoldenrod" />
</asp:GridView>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?