我有以下代码:
$.ajax({
type: "POST",
url: '<%=Url.Action("test","pepole") %>',
data: $("#PeopleForm").submit(),
contentType: "application/json; charset=utf-8",
dataType: "html",
sucess: function() {
},
error: function(request, status, error) {
$("#NotSelectedList").html("Error: " & request.responseText);
}
});
PeopleForm显示在对话框中。提交后,对话框将关闭。这是正常的吗?我不希望在提交后关闭对话框。我怎么能这样做?
控制器如下:
public ActionResult test(Model model)
{
model.SaveNotification();
return RedirectToAction("Index");
}
public ActionResult test(Model model)
{
model.SaveNotification();
return Json(new { Result = true });
}