📄 fixtures.aspx
字号:
<%@ Page Language="C#" MasterPageFile="~/site.master" AutoEventWireup="true" codefile="Fixtures.aspx.cs" Inherits="Fixtures" title="Fixtures" %>
<asp:Content ID="Content1" ContentPlaceHolderID="mainContent" Runat="server">
<asp:label id="FixtureDateLabel" runat="server" style="visibility:hidden" />
<asp:sqldatasource id="SqlDataSource1" runat="server"
connectionstring="<%$ ConnectionStrings:WroxUnited %>">
<SelectParameters>
<asp:ControlParameter ControlID="FixtureDateLabel" PropertyName="Text" Name="FixtureDate" Type="DateTime"></asp:ControlParameter>
</SelectParameters>
</asp:sqldatasource>
<asp:gridview
id="fixturetable" runat="server" datakeynames="FixtureID" datasourceid="SqlDataSource1"
emptydatatext="There are no data records to display." autogeneratecolumns="False" UseAccessibleHeader="true"
allowpaging="True" allowsorting="True">
<Columns>
<asp:CommandField ShowSelectButton="True" SelectText="More Details"></asp:CommandField>
<asp:BoundField AccessibleHeaderText="Fixture Number" ReadOnly="True" HeaderText="FixtureID" DataField="FixtureID" SortExpression="FixtureID" Visible="False"></asp:BoundField>
<asp:BoundField AccessibleHeaderText="Fixture Date" HeaderText="Date" DataField="FixtureDate" SortExpression="FixtureDate" DataFormatString="{0:dd-MMM-yy}"></asp:BoundField>
<asp:BoundField HeaderStyle-CssClass="foo" HeaderText="Fixture Type" DataField="FixtureType" SortExpression="FixtureType"></asp:BoundField>
<asp:BoundField HeaderText="Opponents" DataField="Opponents" SortExpression="Opponents"></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>
<p />
<asp:sqldatasource id="SqlDataSource2" runat="server" providername="System.Data.SqlClient"
selectcommand="SELECT [Notes] FROM [Fixtures] WHERE ([FixtureID] = @FixtureID)"
connectionstring="<%$ ConnectionStrings:WroxUnited %>">
<SelectParameters>
<asp:ControlParameter Name="FixtureID" Type="Int32" ControlID="fixturetable" PropertyName="SelectedValue"></asp:ControlParameter>
</SelectParameters>
</asp:sqldatasource>
<asp:detailsview id="DetailsView1" runat="server" datasourceid="SqlDataSource2" autogeneraterows="False">
<Fields>
<asp:BoundField DataField="Notes" SortExpression="Notes"></asp:BoundField>
</Fields>
</asp:detailsview>
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -