I have the following code:
$.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);
}
});
The PeopleForm is displayed in a dialog. After the submit, the dialog gets closed. Is that normal? I don`t want the dialog to get closed after the submit. How can I do that?
The controller is as below:
public ActionResult test(Model model)
{
model.SaveNotification();
return RedirectToAction("Index");
}
public ActionResult test(Model model)
{
model.SaveNotification();
return Json(new { Result = true });
}