我需要从Ajax调用更新Multiple。我使用这个页面:Returning Multiple partial views from single Controller action?但重复约会!!为什么?
我的代码在视图中:
@using (Ajax.BeginForm("Information", "Classes",
new AjaxOptions
{
HttpMethod = "get"
}))
{
<select id="dropDownDisplay">
<option>10</option>
<option>20</option>
<option>30</option>
</select>
<div id="grid">
@{ Html.RenderPartial("_ClassesList", Model); }
</div>
<div id="PagingList">
@{Html.RenderPartial("_PageNumbers", Model.Page);}
</div>
}
我在控制器中的代码:
公共ActionResult信息() {
var page = new Page();
// Get Info Page...
var myService = new ClassesService();
var viewModelClasses= new ViewModelClasses();
viewModelClasses.Classeses = myService.All();
viewModelClasses.Page = page;
return View(viewModelClasses);
}
我的观看模式:
public class ViewModelClasses
{
public IList<Classes> Classeses { get; set; }
public Page Page { get; set; }
}
输出当我转到下一页时: