how return error json server in mvc , handle error in jqgrid? in controller use this
throw new exception("message");
and in jqgrid use
loaderror: error ////
and function
function error(xhr, st, err) { console.log(xhr.responsemessage); }
but there html code in xhr.responsemessage, , need error message.
server side
try { // processing } catch (exception e) { response.statuscode = (int)httpstatuscode.badrequest; return json(new { message = e.message}); }
jqgrid
loaderror: function(xhr, status, error) { alert(xhr.responsetext); }
Comments
Post a Comment