Is it possible to skip the whole action method execution and return a specific ActionResult when a certain condition is met in OnActionExecuting?>
You can use the following code here.
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
...
if (needToRedirect) //your condition here
{
...
filterContext.Result = new RedirectToAction(string action, string controller)
return;
}
...
}
RedirectToAction will redirect you the specific action based on the condition.