Filter.Order Property

Gets the order in which the filter is applied.

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

function get Order () : int 
protected function set Order (value : int)

Property Value

Type: System.Int32
The order in which the filter is applied.

Filters are run in the order of the filter type. Authorization filters run first and exception filters run last. Within each filter type, the Order value specifies the order. The execution order of filters with the same order and scope is undefined. OnActionExecuting(ActionExecutingContext), OnResultExecuting(ResultExecutingContext) and OnAuthorization(AuthorizationContext) are run in forward order; OnActionExecuted(ActionExecutedContext), OnResultExecuting(ResultExecutingContext), and OnException(ExceptionContext) are run in reverse order. For more information about ASP.NET MVC filters, see Filtering in ASP.NET MVC.

Show: