Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
In my controller index method I am calling
return View( viewModel )
where viewModel is of type list and I have to pass Paged list to get pagination links and for that I am using '
return View(viewModel.ToPagedList(pageNumber,pageSize));

and even after that i am using the below
<%: Html.PagedListPager((IPagedList)Model, page => Url.Action("Index",
new { page}),PagedListRenderOptions.PageNumbersOnly)%>

I am able to see only the first page data and when click on second page or other I am not able to load the records
Please explain me the solution for this

What I have tried:

I am passing the viewmodel of type list from controller and when passing to a view some times I am getting the exceptions
Posted
Comments
John C Rayan 4-Mar-16 10:23am    
I would recommend using WebGrid / JTable / JQGrid for better solution.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900