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

📄 leaguetable.aspx

📁 ASP.NET2.0(C#篇)经典教程的源码...本源码很好的实现了购物车....编码规范和类的设计具有很好的借鉴性!
💻 ASPX
字号:
<%@ Page Language="C#" MasterPageFile="~/site.master" AutoEventWireup="true" codefile="LeagueTable.aspx.cs" Inherits="LeagueTable" %>    
<asp:Content ID="Content1" ContentPlaceHolderID="mainContent" Runat="server">

    <asp:sqldatasource id="SqlDataSource1" runat="server" selectcommand="SELECT [Won]+[Drawn]+[Lost] AS [Played],[OpponentID], [Name], [Won], [Drawn], [Lost], [TotalGoalsFor], [TotalGoalsAgainst], [Points],[TotalGoalsFor]- [TotalGoalsAgainst] AS [GoalDifference] FROM [Opponents] Order By [Points] DESC, [GoalDifference] DESC, [TotalGoalsFor] DESC"
        connectionstring="<%$ ConnectionStrings:WroxUnited %>"></asp:sqldatasource>
        
    <asp:gridview id="GridView1" runat="server" datakeynames="OpponentID" datasourceid="SqlDataSource1"
        emptydatatext="There are no data records to display." autogeneratecolumns="False"
        allowpaging="True" allowsorting="False">
        <Columns>
            <asp:CommandField ShowSelectButton="False"></asp:CommandField>
            <asp:BoundField ReadOnly="True" HeaderText="OpponentID" DataField="OpponentID" SortExpression="OpponentID" Visible="False"></asp:BoundField>
            <asp:BoundField HeaderText="Name" DataField="Name" SortExpression="Name"></asp:BoundField>
            <asp:BoundField HeaderText="Played" DataField="Played" SortExpression="Played"></asp:BoundField>
            <asp:BoundField HeaderText="Won" DataField="Won" SortExpression="Won"></asp:BoundField>
            <asp:BoundField HeaderText="Drawn" DataField="Drawn" SortExpression="Drawn"></asp:BoundField>
            <asp:BoundField HeaderText="Lost" DataField="Lost" SortExpression="Lost"></asp:BoundField>
            <asp:BoundField HeaderText="TotalGoalsFor" DataField="TotalGoalsFor" SortExpression="TotalGoalsFor"></asp:BoundField>
            <asp:BoundField HeaderText="TotalGoalsAgainst" DataField="TotalGoalsAgainst" SortExpression="TotalGoalsAgainst"></asp:BoundField>
            <asp:BoundField HeaderText="Points" DataField="Points" SortExpression="Points"></asp:BoundField>
        </Columns>
    </asp:gridview>

</asp:Content>

⌨️ 快捷键说明

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