在MVC 5中,如何爲表創建分頁?以下是表結構。在MVC中尋呼5
<table class="table">
<tr>
<th>
Item ID
</th>
<th>
Item Name
</th>
<th>
Rate
</th>
<th>
Stock
</th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.ItemID)
</td>
<td>
@Html.DisplayFor(modelItem => item.ItemName)
</td>
<td>
@Html.DisplayFor(modelItem => item.Rate)
</td>
<td>
@Html.DisplayFor(modelItem => item.Stock)
</td>
</tr>
}
</table>
爲什麼不使用webgrid中的構建它會爲你創建分頁表? http://msdn.microsoft.com/en-us/magazine/hh288075.aspx – Cookie