0
我試圖在MVC應用程序上實現腳標的pluglin,它目前有3000+用戶無法加載並且瀏覽器頁面超時。對於用戶管理部分,我創建了以下觀點:當行數超過1000時,腳表超時
@model IEnumerable<MyBudgetWeb.Models.ApplicationUser>
@{
ViewBag.Title = "Index";
}
<script src="~/Scripts/jquery-1.10.2.js"></script>
<script type="text/javascript">
$(function() {
$('.footable').footable();
});
</script>
<br /><br />
<h2>Bill Pay Users</h2>
<input id="filter" type="text" placeholder="Filter" />
<br /><br />
@if (Model.Count() > 0)
{
<table class="table" data-filter="#filter" data-page-size="50">
<thead>
<tr>
<th data-type="numeric">Customer Number</th>
<th data-type="numeric">Account Name</th>
<th data-type="numeric" data-hide="phone">Go Live Date</th>
<th data-type="numeric" data-hide="phone">Online Live Date</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>@item.CustomerNumber</td>
<td>@item.AccountName</td>
<td>@item.GoLiveDate</td>
<td>@item.OnlineCreationTimestamp</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
@Html.ActionLink("Details", "Details", new { id = item.Id }) |
@*@Html.ActionLink("Delete", "Delete", new { id = item.Id })*@
</td>
</tr>
}
</tbody>
<tfoot class="hide-if-no-paging">
<tr>
<td colspan="12" class="text-center">
<ul class="pagination"></ul>
</td>
</tr>
</tfoot>
</table>
}
else
{
<h2>You are still awaiting users to be added. All users will be displayed here.</h2>
}
我的控制器看起來如下:
public async Task<ActionResult> Index()
{
return View(await UserManager.Users.ToListAsync());
}
有任何變通辦法的方式來防止這種情況?
這可能會感興趣:http://stackoverflow.com/a/28619983/1236044 – jbl