Monday, January 13, 2014

What is An ActionFilters in MVC..?

Sometimes you want to perform logic either before an action method is called or after an action method runs. To support this, ASP.NET MVC provides filters. Filters are custom classes that provide both a declarative and programmatic means to add pre-action and post-action behavior to controller action methods.



ASP.NET MVC supports the following types of action filters:
What are the Types of Action Filters ?


Types of Action Filters

  • Authorization filters. These implement IAuthorizationFilter and make security decisions about whether to execute an action method, such as performing authentication or validating properties of the request. The AuthorizeAttribute class and the RequireHttpsAttribute class are examples of an authorization filter. Authorization filters run before any other filter.
  •  

No comments:

Post a Comment