This started as a question, but turned into a solution as I did some experimenting! So I thought I would share this with you all. My question WAS:
How to use MvcContrib.Pagination without using MvcContrib.Grid View?
My answer is below…
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I am building a Help Desk Ticketing System (I am kind of a C# newbie – got many pointers from NerdDinner) and I wish to use some sort of paging library to help with the view. I found MvcContrib.Pagination and I got it to work for a view. My view does NOT use MvcContrib.Grid because it is custom.
Scaled down version of my view List.aspx :
My controller (part) TicketController.cs :
I am using the repository pattern which is returning the results as IQueryable. Here is part of the TicketRepository.cs file:
All this may be trivial to some, but if someone like me is trying to learn C# and ASP.NET MVC and paging, then this may be useful. I recommend newbies to do the NerdDinner tutorial found at:
http://nerddinnerbook.s3.amazonaws.com/Intro.htm
🙂