📄 xuesheng3.aspx
字号:
<%@ Page Language="C#" MasterPageFile="~/MasterPage2.master" AutoEventWireup="true" CodeFile="xuesheng3.aspx.cs" Inherits="_Default" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" Width="718px" AutoGenerateColumns="False" OnPageIndexChanging="Data_Page" OnRowCommand="GridView1_RowCommand" DataKeyNames="courceID,teaID" ForeColor="#333333" GridLines="None" CellPadding="4">
<Columns>
<asp:BoundField DataField="courceID" HeaderText="courceID" ReadOnly="True" Visible="False" SortExpression="courceID" />
<asp:BoundField DataField="teaID" Visible="False" HeaderText="teaID" ReadOnly="True" SortExpression="teaID" />
<asp:HyperLinkField DataTextField="courcename" HeaderText="课程名称" DataNavigateUrlFields="courceID,teaID" DataNavigateUrlFormatString="courceinfo.aspx?courceID={0}&teaID={1}"/>
<asp:BoundField DataField ="teaname" HeaderText="教师姓名" SortExpression="teaname" />
<asp:BoundField DataField ="courcetime" HeaderText="上课时间" SortExpression="courcetime" />
<asp:BoundField DataField ="courceaddress" HeaderText="上课地点" SortExpression="courceaddress" />
<asp:BoundField DataField ="departname" HeaderText="所属院系" SortExpression="departname"/>
<asp:BoundField DataField ="courcerenshu" HeaderText="限选人数" SortExpression="courcerenshu"/>
<asp:BoundField DataField ="renshu" HeaderText="已选人数" SortExpression="renshu"/>
<asp:ButtonField CommandName="select" HeaderText="选修" Text="选修">
<ItemStyle Width="60px" Wrap="False" />
<HeaderStyle Wrap="False" />
</asp:ButtonField>
</Columns>
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#EFF3FB" />
<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" />
<AlternatingRowStyle BackColor="White" />
<PagerTemplate>
<table>
<tr>
<td>
<asp:Label ID="LabelCurrentPage" runat="server" Font-Size="Small">当前页:<%# ((GridView)Container.NamingContainer).PageIndex + 1 %></asp:Label></td>
<td>
<asp:Label ID="LabelPageCount" runat="server" Font-Size="Small">总页数:<%# ((GridView)Container.NamingContainer).PageCount %></asp:Label></td>
<td>
<asp:LinkButton ID="LinkButtonFirstPage" runat="server" CommandArgument="First" CommandName="Page"
Enable="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>" Font-Size="Small">首页</asp:LinkButton></td>
<td>
<asp:LinkButton ID="LinkButtonPreviousPage" runat="server" CommandArgument="Prev"
CommandName="Page" Enable="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>"
Font-Size="Small">上一页</asp:LinkButton></td>
<td>
<asp:LinkButton ID="LinkButtonNextPage" runat="server" CommandArgument="Next" CommandName="Page"
Enable="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>"
Font-Size="Small">下一页</asp:LinkButton></td>
<td>
<asp:LinkButton ID="LinkButtonLastPage" runat="server" CommandArgument="Last" CommandName="Page"
Enable="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>"
Font-Size="Small">尾页</asp:LinkButton></td>
</tr>
</table>
</PagerTemplate>
</asp:GridView>
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -