Page 241 Chapter7 No Page button is showing on browser.
It is DetailsView try out from page 240-242. I checked my Fixture Table from server explore and it has 10 rows which means I have 10 data. Since the book example show 1 data at a time using Detail view, I should have page button on the bottom; however, it does not exist. I can see first row data only on the browser when I run it; however, I can't really go next page or different page to see rest of the record. I need to somehow make numeric page button appear so I can see rest of the data on detailview and not sure what can be done.... Help please. here is my code. It should be exactly same or about same as page 241 Beginning ASP.net 2.0 C#.
<%@ Page Title="" Language="C#" MasterPageFile="~/site.master" AutoEventWireup="true" CodeFile="Fixtures-Stacked.aspx.cs" Inherits="Fixtures_Stacked" %>
<asp:Content ID="Content1" ContentPlaceHolderID="mainContent" Runat="Server">
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False"
DataKeyNames="FixtureID" DataSourceID="SqlDataSource2" Height="50px"
Width="500px">
<PagerSettings FirstPageText="First Game of the Season" LastPageText="Last Game of the Season"
Mode="NumericFirstLast" />
<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="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:WroxUnited %>"
SelectCommand="SELECT * FROM [Fixtures]"></asp:SqlDataSource>
</asp:Content>
|