Answer the question
In order to leave comments, you need to log in
How to do proper paging with Ajax.BeginForm?
@using (Ajax.BeginForm(MVC.Сar.GetPartialView(size, page), new AjaxOptions { UpdateTargetId = "update_grid"}))
{
}
<a href="#">@i</a> //здесь в циклt выводятся страницы по порядку - 1 2 3 ....
Answer the question
In order to leave comments, you need to log in
Suppose your request is waiting for a page number to be returned.
The simplest and most banal is to make a hidden field with the page number.
And to links to hang up the following handler.
<script>
function GetPage(var page)
{
$("#селектор скрытого поля, хранящий номер страницы").val(page);
$("#идентификатор формы").submit();
return false;
}
</script>
<a href="#" onclick=GetPage(@i)>@i</
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question