我有表與ajax分頁,我可以選擇任何頁面和查看數據,但如果我按我的瀏覽器刷新,它顯示頁面一號。如何在刷新後留在同一張桌面上?頁面刷新後Ajax分頁,行爲不正確
這是代碼的一部分。
@using (Ajax.BeginForm(new AjaxOptions() { UpdateTargetId = "users_rows", Url = Url.Action("UsersRows") }))
{
<table>
<thead>
<tr>
<th>@Resources.Id</th>
<th>@Resources.Login</th>
<th>@Resources.Password</th>
<th>@Resources.FirstName</th>
<th>@Resources.LastName</th>
<th>@Resources.Birthday</th>
<th>@Resources.IsActive</th>
<th>@Resources.Role</th>
<th>@Resources.RegistrationDate</th>
</tr>
</thead>
<tbody id="users_rows">
@Html.Partial("UsersRows", Model)
</tbody>
</table>
}
@Html.Partial("Pager", Model)
Pager.cshtml:
@model UserManagmentStudio.Domain.IPager
@if (Model.PageCount > 1)
{
for (Int32 i = 1; i <= Model.PageCount; i++)
{
@Ajax.ActionLink(i.ToString(), "Index", new {page = i},
new AjaxOptions()
{
UpdateTargetId = "users_rows",
Url = Url.Action("UsersRows", new { page = i }),
}
)
@: 
}
}