📄 matchreports.aspx
字号:
<%@ Page trace="false" EnableViewState="false" Language="C#" MasterPageFile="~/site.master" AutoEventWireup="true" codefile="MatchReports.aspx.cs" Inherits="MatchReports" %>
<asp:Content ID="Content1" ContentPlaceHolderID="mainContent" Runat="server">
<asp:sqldatasource id="SqlDataSource1" runat="server"
EnableCaching="true" CacheDuration="Infinite"
selectcommand="SELECT [FixtureID], [FixtureDate], [FixtureType], [GoalsFor], [GoalsAgainst], [Notes], [Opponents] FROM [dbo].[Fixtures]"
connectionstring="<%$ ConnectionStrings:WroxUnited %>"></asp:sqldatasource>
<asp:gridview id="GridView1" runat="server" datakeynames="FixtureID" datasourceid="SqlDataSource1"
emptydatatext="There are no data records to display." autogeneratecolumns="False"
allowpaging="True" allowsorting="True">
<Columns>
<asp:CommandField ShowSelectButton="True" SelectText="More Details"></asp:CommandField>
<asp:BoundField ReadOnly="True" HeaderText="FixtureID" DataField="FixtureID" SortExpression="FixtureID" Visible="False"></asp:BoundField>
<asp:BoundField HeaderText="Date" DataField="FixtureDate" SortExpression="FixtureDate" DataFormatString="{0:dd-MMM-yy}"></asp:BoundField>
<asp:BoundField HeaderText="Opponents" DataField="Opponents" SortExpression="Opponents"></asp:BoundField>
<asp:BoundField HeaderText="Fixture Type" DataField="FixtureType" SortExpression="FixtureType"></asp:BoundField>
<asp:BoundField HeaderText="Goals For" DataField="GoalsFor" SortExpression="GoalsFor"></asp:BoundField>
<asp:BoundField HeaderText="Goals Against" DataField="GoalsAgainst" SortExpression="GoalsAgainst"></asp:BoundField>
</Columns>
</asp:gridview>
<asp:sqldatasource id="SqlDataSource2" runat="server"
selectcommand="SELECT [FixtureID], [Report], [MemberName] FROM [MatchReports] WHERE ([FixtureID] = @FixtureID)"
connectionstring="<%$ ConnectionStrings:WroxUnited %>">
<SelectParameters>
<asp:ControlParameter Name="FixtureID" Type="Int32" ControlID="GridView1" PropertyName="SelectedValue"></asp:ControlParameter>
</SelectParameters>
</asp:sqldatasource>
<p />
<asp:repeater id="Repeater1" runat="server" datasourceid="SqlDataSource2">
<Itemtemplate>
<p>
<div class="itemTitle">
<asp:Label Text='<%# Bind("MemberName") %>' runat="server" id="Label1" />
</div>
<asp:Label Text='<%# Bind("Report") %>' runat="server" id="ReportLabel" /><br />
</p>
</Itemtemplate>
</asp:repeater>
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -