MVC 4 PagedList - its makes my pages into a list

1.4k Views Asked by At

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

There are 1 best solutions below

0
On

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>