Hi,
Every time you search for post on SOF, you can browse through the result with page-navigation feature. How do I create a Paging feature like SOF? I like that feature a lot.
Hi,
Every time you search for post on SOF, you can browse through the result with page-navigation feature. How do I create a Paging feature like SOF? I like that feature a lot.
using MvcContrib.Pagination;
public ActionResult Index(int? page)
{
var pageNo = page?? 1; // default to page 1
var someEnumerable = GetData(); // returns your collection
var cutomPage =
PaginationHelper.AsPagination<SomeObject>(someEnumerable , pageNo);
return View(“Index”, CustomPage);
}
Also have a look at this tutorial: NerdDinner Step 8: Paging Support
var paginatedDinners = upcomingDinners.Skip(10).Take(20).ToList();
references:
EDIT: For Web-forms look at this Tutorial Series