Sunday 29 September 2013

MVC Paging Display issue with page numbers

MVC Paging Display issue with page numbers

In my View i have implemented a paging and everything looks good. However
the format of page numbers is not what i expected. Its showing the pages
index like this :
««
«

3
4
5
6
7
8
9
10
11
12

»
»»
clicking this links works, but it should have displayed things in a
straight row
here is the code for my view
<table>
<tr>
<th>
Account Type
</th>
<th>
Account #1
</th>
<th>
Account #2
</th>
<th>
Amount
</th>
<th>
Comment
</th>
<th>
Date
</th>
</tr>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.TransactionType)
</td>
<td>
@Html.DisplayFor(modelItem => item.AccountNumber)
</td>
<td>
@Html.DisplayFor(modelItem => item.DestAccount)
</td>
<td>
@Html.DisplayFor(modelItem => item.Amount)
</td>
<td>
@Html.DisplayFor(modelItem => item.Comment)
</td>
<td>
@Html.DisplayFor(modelItem => item.ModifiedDate)
</td>
</tr>
}
</table>
@Html.PagedListPager(Model, page => Url.Action("Index",new {page}))

No comments:

Post a Comment