0
我有一個ajax後,並在控制器中,我什麼都沒有返回。如果出現故障,錯誤信息將與下面的代碼一起顯示出來嗎?是否顯示錯誤?
[AcceptVerbs(HttpVerbs.Post)]
public void Edit(Model model)
{
model.Save();
}
$.ajax({
type: "POST",
url: '<%=Url.Action("Edit","test") %>',
data: JSON.stringify(data),
contentType: "application/json; charset=utf-8",
dataType: "html",
success: function() {
},
error: function(request, status, error) {
alert("Error: " & request.responseText);
}
});