问题
I have got a page where I'm using the Nuget package PagedList.Mvc 4.3.0.0 (The latest version for MVC4). The problem is that when I'm listing the pages its makes my pages into a list of which look like
«
Showing items 1 through 5 of 17.
»
Instead of « Showing items 1 through 5 of 17. »
My view looks like
<div class="pagedList" >
@Html.PagedListPager(Model, page=> Url.Action("index", new { page }), PagedListRenderOptions.MinimalWithItemCountText)
</div>
Any suggestions on what could be wrong? The standard CSS is included as well.
回答1:
Make changes in your code like this....
<div class="page_numbers page_numbers-sec">
<div class="pagination">
Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber)
of @Model.PageCount
@Html.PagedListPager(Model, page => Url.Action("Index",new { page}))
</div>
</div>
来源:https://stackoverflow.com/questions/18648346/mvc-4-pagedlist-its-makes-my-pages-into-a-list