Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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)
public int Order { get; protected set; }

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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.