usersonline.aspx
来自「《圣殿祭司的ASP.NET 2.0开发详解——使用C#》光盘内容.包含了书籍所含」· ASPX 代码 · 共 45 行
ASPX
45 行
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UsersOnline.aspx.cs" Inherits="UsersOnline" %>
<html>
<head>
<title>Sample: Find Users</title>
</head>
<body>
<form id="Form1" runat="server">
<h3>
目前在线用户统计</h3>
目前在线用户人数:
<asp:Label id="txtUsersOnline" runat="Server" /><BR>
<asp:Panel id="NavigationPanel" runat="server">
<table border=0 cellpadding=3 cellspacing=3>
<tr>
<td width=100>
分页码:<asp:Label id="txtCurrentPage" runat="server" />
of <asp:Label id="txtTotalPages" runat="server" /></td>
<td width=60>
<asp:ImageButton ID="PreviousButton" runat="server" ImageUrl="~/Images/Previous.gif"
OnClick="PreviousButton_Click" /></td>
<td style="width: 60px">
<asp:ImageButton ID="NextButton" runat="server" ImageUrl="~/Images/Next.gif"
OnClick="NextButton_Click" /></td>
</tr>
</table>
</asp:Panel>
<asp:GridView ID="gvOnlineUsers" runat="server" BackColor="LightGoldenrodYellow"
BorderColor="Tan" BorderWidth="1px" CellPadding="2" ForeColor="Black" 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" />
</asp:GridView>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?