top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Can you describe different types of action filters in brief provided in ASP.NET MVC?

0 votes
424 views
Can you describe different types of action filters in brief provided in ASP.NET MVC?
posted Sep 22, 2016 by Sathaybama

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

There are three types of action filters in ASP.NET MVC.

Authorization Filter :

-This filter is responsible for the execution of an action method.

-For example AuthorizeAttribute class is an authorization filter.

Result Filter:

-It wraps execution of the ActionResult object.

-This filter is responsible for the processing of the result in the case if any modification is required.

-For example OutputCacheAttribute class is a result filter.

Execution Filter:

-This filer is executed when any unhandled exception is occurred in action method from the authorization filters to execution of the result.

-We can use Exception filters for logging or displaying an error page.

-For example HandleErrorAttribute class is an exception filter.

answer Sep 22, 2016 by Shivaranjini
...