After applying the various Errata comments to this exercise, I managed to complete it but found that the Pager Settings Mode didn't work as expected. In step 4, we set NumericFirstLast, but the result viewed in the browser is the same as Numeric - the FirstPageText and LastPageText values are ignored. The alternative setting NextPreviousFirstLast displays the PageText values as expected. Why not NumericFirstLast?
Here is my code:
Code:
<%@ Page Language="VB" MasterPageFile="~/site.master" AutoEventWireup="false" CodeFile="Fixtures-Stacked.aspx.vb" Inherits="Fixtures_Stacked" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
<asp:detailsview ID="DetailsView1" runat="server" AllowPaging="True" AutoGenerateRows="False"
DataKeyNames="FixtureID" DataSourceID="SqlDataSource1" Height="50px" Width="350px">
<pagersettings FirstPageText="First Game of the Season" LastPageText="Last Game of the Season" />
<fields>
<asp:boundfield DataField="FixtureID" HeaderText="FixtureID" InsertVisible="False"
ReadOnly="True" SortExpression="FixtureID" />
<asp:boundfield DataField="FixtureDate" HeaderText="FixtureDate" SortExpression="FixtureDate" />
<asp:boundfield DataField="FixtureType" HeaderText="FixtureType" SortExpression="FixtureType" />
<asp:boundfield DataField="GoalsFor" HeaderText="GoalsFor" SortExpression="GoalsFor" />
<asp:boundfield DataField="GoalsAgainst" HeaderText="GoalsAgainst" SortExpression="GoalsAgainst" />
<asp:boundfield DataField="Notes" HeaderText="Notes" SortExpression="Notes" />
<asp:boundfield DataField="Opponents" HeaderText="Opponents" SortExpression="Opponents" />
</fields>
</asp:detailsview>
<asp:sqldatasource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:WroxUnited %>"
SelectCommand="SELECT * FROM [Fixtures]"></asp:sqldatasource>
</asp:Content>
Richard
Rugeley, UK
WinXP Pro SP2
VBW Express