When I'm trying to go to page 2, it shows the site loading, but it only brings me the first information on page 1 of my page. My Controller:
public ActionResult Index(int? page)
{
IList<Abastecimento> abastecimento = dao.Lista();
page = 1;
int NumRegistro = 10;
int NumPag = (page ?? 1);
return View(abastecimento.ToPagedList(NumPag, NumRegistro));
}
My View:
Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber) of @Model.PageCount
@Html.PagedListPager(Model, page => Url.Action("Index", new { page }))