In my ASP.NET MVC 2 application I use HandleErrorAttribute to display a custom error page in case of unhandled exceptions, and it works perfectly unless the exception happens in an action called by Ajax.ActionLink. In this case nothing happens. Is it possible to use HandleErrorAttribute to update the target element with the contents of an “Error.ascx” partial view?
In my ASP.NET MVC 2 application I use HandleErrorAttribute to display a custom error
Share
To achieve this you could write a custom action filter:
And then specify the partial view to be used:
And finally in your view assuming you have the following link:
You could make the
handleFailurefunction to update the proper div: