I want to redirect to other view on Exception. I have the following code OnException. But how can I change the view?
protected override void OnException(ExceptionContext filterContext)
{ // Let other exceptions just go unhandled
if (filterContext.Exception is InvalidOperationException)
{ // Switch to an error view ...
}
}
How to switch to an error view??
ok..managed to do this using following code: