首页 > 解决方案 > 发出 AJAX 请求后如何切换视图?

问题描述

从视图发送 AJAX POST 请求后,我无法切换视图。

$("._button2").click(function() {
  var $row = $(this).closest("tr"); // Find the row
  var model = {
    IDLicence: $row.find(".IDLicence").text(),
    name: $row.find(".name").text(),
    tel_number: $row.find(".name").text(),
    seniority: $row.find(".seniority").text(),
    eye_examination: $row.find(".eye_examination").text()
  };

  var url = "@Url.Action("Edit","Ctaxi")";
  $.post(url, model)
});

这是我的行动:

[HttpPost]
public ActionResult Edit(Driver d)
{
  return View("Edit");
}

标签: jqueryasp.net-mvc

解决方案


推荐阅读