In a MVC app with an error page Error.cshtml
located in the Shared folder, how to redirect on this page in case on error returned by the ajax call ?
$.ajax({
//Some stuff here...
error: function (jqXHR, textStatus, errorThrown) {
window.location = "???????";
}
}
Just add your controller name followed by your action name - like this /[ErrorController]/[ErrorActionName]
this might solve your issue - Thanks
Don't forget the forward slash
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments