Reputation: 191
Being new to ASP.NET MVC, I would like to know the easy method of paging. The data is IQueryable type.
Upvotes: 0
Views: 265
Reputation: 126587
I've been using this PagedList type, originally developed by Rob Conery, and enhanced by Troy Goode. I've even written extension methods which make it work with jqGrid. For sheer ease of use, I don't think you're going to beat it.
Upvotes: 4
Reputation: 422252
var dataPage = data.Skip(pageNumber * pageSize - pageSize).Take(pageSize);
To learn the basic tricks of ASP.NET MVC, I suggest reading the free Professional ASP.NET MVC 1.0 Book Chapter 1 by Scott Guthrie
Upvotes: 2