Jquery ajax-渲染两个局部视图

Jquery ajax-渲染两个局部视图,jquery,asp.net-mvc,Jquery,Asp.net Mvc,单击一个按钮,我使用jquery$.ajax获取一些数据,调用controller action方法并返回一个强类型的局部视图。数据显示在表格中 当数据可用时,我还需要呈现另一个强类型局部视图(与resultSetView的模型相同),以显示resultSetView的页面导航按钮 我怎么做第二部分 $.ajax({ type: "POST", url: $form.attr('action'), data: $form.s

单击一个按钮,我使用jquery$.ajax获取一些数据,调用controller action方法并返回一个强类型的局部视图。数据显示在表格中

当数据可用时,我还需要呈现另一个强类型局部视图(与resultSetView的模型相同),以显示resultSetView的页面导航按钮

我怎么做第二部分

$.ajax({
            type: "POST",
            url: $form.attr('action'),
            data: $form.serialize(),
            error: function (xhr, status, error) {
                //do something about the error   
            },
            success: function (response) {
                $("#resultSetDiv").html(response);
                //need to reload pageNavigationDiv
            }
        });
标记就像

<div id="pageNavigation >
    @Html.Partial("_pageNavigationView")
</div>
<div id="resultSetDiv">
     @RenderSection("_resultSetView")
</div>

以以下格式从操作方法发送
JSON
响应

{
    "success": "true",
    "currentPage": "3",
    "totalPages": "12",
    "viewString": "<div>Somecontent</div>"
}
这说明了如何以JSON格式发送ViewResult

success: function (response) {
          if(response.sucesss=="true")
          {
              $("#resultSetDiv").html(response.viewString);
              $("#yourPageNumber").html(response.currentPage);
          }
}