Controller.OnActionExecuting Method (ActionExecutingContext)


Called before the action method is invoked.

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)


protected virtual void OnActionExecuting(
    ActionExecutingContext filterContext
virtual void OnActionExecuting(
    ActionExecutingContext^ filterContext
abstract OnActionExecuting : 
        filterContext:ActionExecutingContext -> unit
override OnActionExecuting : 
        filterContext:ActionExecutingContext -> unit
Protected Overridable Sub OnActionExecuting (
    filterContext As ActionExecutingContext



If this method is overridden in a derived Controller class, it will be called for every action method in the class. For more flexibility, derive a class from ActionFilterAttribute and override this method in the derived ActionFilterAttribute class.

See Also

Controller Class
System.Web.Mvc Namespace

Return to top