i have a partialview that has tabular data.. i am using PagedList for paging.
it works good with a normal view, but when I tried to put it on a partial view, when I click next or any other pages, it just refreshes the whole page and my view breaks :(
I want to refresh the partialview only meaning when I perform pagination, i just want to change the partialview not the whole view.
this is the code for pagination i my partialview...
Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber) of @Model.PageCount
@Html.PagedListPager( Model, page => Url.Action("StudentList", new { page, sortOrder = ViewBag.CurrentSort, currentFilter=ViewBag.CurrentFilter }) )
i tried to put Ajax.ActionLink instead of Url.Action with no success... any help??
well, I found the answer. Someone else had the similar question that I just found out...
here is it: Using paging in partial view, asp.net mvc
and it works just fine..