Wednesday 5 August 2015

ASP.Net MVC Filters


  • In MVC, we can inject our piece of code or logic either before or after an action is executed.
  • This can be achieved by adding MVC attributes or custom attributes to the controllers or actions.
  • We can make your own custom filters or attributes either by implementing ASP.NET MVC filter interface or by inheriting and overriding methods of ASP.NET MVC filter attribute class if available.

The ASP.NET MVC framework provides five types of filters.

  • Authentication filters (New in ASP.NET MVC5)
  • Authorization filters
  • Action filters
  • Result filters
  • Exception filters


No comments:

Post a Comment