How to access RedirectToAction from a custom ActionFilter?
public class ExceptionHandlingFilterAttribute : ActionFilterAttribute
{
public override void OnActionExecuted(ActionExecutedContext filterContext)
{
if (filterContext.Exception != null && !filterContext.ExceptionHandled)
{
filterContext.ExceptionHandled = true;
}
base.OnActionExecuted(filterContext);
}
}
source
share