Pagination Issues

Sep 28, 2011 at 7:37 PM

I am getting in error in my index.aspx because of these lines. Specifically "Model.HasPreviousPage" and "Model.HasNextPage" 

    <% if (Model.HasPreviousPage)
       { %>
    <%= Html.RouteLink("<<<", "UpcomingDinners", new { page = (Model.PageIndex-1) }) %>
    <% } %>
    <% if (Model.HasNextPage)
       {  %>
    <%= Html.RouteLink(">>>", "UpcomingDinners", new { page = (Model.PageIndex + 1) }) %>
    <% } %>

I have added the paginatedlist.cs to my Helpers folder and placed using NerdDinner.Helpers at the top of the DinnersController.

 

What else am I missing?

Sep 28, 2011 at 7:47 PM

Resolved.

 

the index aspx needs

Inherits="System.Web.Mvc.ViewPage<NerdDinner.Helpers.PaginatedList<NerdDinner.Models.Dinner>>"