1、固定每頁多少條,如20、40,可在數值間選擇
2、根據可見區高度計算顯示每頁條數
uj5u.com熱心網友回復:
后臺:CulturesList = Cultures
//make sure to order items before paging
.OrderBy(x=>x.EnglishName)
//skip items before current page
.Skip((P-1)*S)
//take only 10 (page size) items
.Take(S)
//call ToList() at the end to execute the query and return the result set
.ToList();
uj5u.com熱心網友回復:
前端:<table class="table table-striped">
<thead>
<tr>
<th>LCID</th>
<th>English Name</th>
<th>Native Name</th>
<th>Culture types</th>
</tr>
</thead>
<tbody>
@foreach (var c in Model.CulturesList)
{
<tr>
<td>@c.LCID</td>
<td>@c.EnglishName</td>
<td>@c.NativeName</td>
<td>@c.CultureTypes</td>
</tr>
}
</tbody>
</table>
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/269788.html
標籤:HTML(CSS)
上一篇:jq選擇器給td放值
下一篇:修改代碼樣式后輸出錯誤原因查詢
