error in Html.Pager

Aug 3, 2010 at 2:32 PM
I am getting this error, and I don't quite understand what is going on. The type arguments for method 'Webdiyer.WebControls.Mvc.PagerHelper.Pager<T>(System.Web.Mvc.AjaxHelper, Webdiyer.WebControls.Mvc.PagedList<T>, System.Web.Mvc.Ajax.AjaxOptions)' cannot be inferred from the usage. Try specifying the type arguments explicitly. here is the code from my Index.aspx that is getting the error I searched through the overloads, and no ajax options where available. <%=Html.Pager(Model,new PagerOptions{PageIndexParameterName="id"}) %>

Coordinator
Aug 10, 2010 at 3:38 AM

What's your view Model? You should specify you model in your view page like following:

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<PagedList<MyModelObject>>" %>