Paging On Simple View Without Using Any Grid
I have a simple page that showing list of data dynamically . The thing i want to do is just to do paging . I am not using any grid . Simply Data is showing on Pag开发者_StackOverflowe . So How Could i do this ?
Give Tablepager a try.
if your data is in a list you could do something like this after getting your data.
viewModel = data.Skip((page - 1) * _itemsPerPage).Take(_itemsPerPage);
and then pass that data in. the only thing missing is setting up a page parameter and adding previous/next links to the page
this code would obviously go into your controller.
A slightly more complex solution - but MvcPager will do what you're after.
精彩评论