Hi, Filtering in ASP.Net MVC: In ASP.NET MVC, controllers define action methods that usually have a
one-to-one relationship with possible user interactions, such as
clicking a link
or submitting a form. For example, when the user clicks a link, a
request is
routed to the designated controller, and the corresponding action method
is
called.
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.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Filtering in ASP.Net MVC:
In ASP.NET MVC, controllers define action methods that usually have a one-to-one relationship with possible user interactions, such as clicking a link or submitting a form. For example, when the user clicks a link, a request is routed to the designated controller, and the corresponding action method is called.
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.
For more details you can refer this link:
http://msdn.microsoft.com/en-us/library/gg416513(v=vs.98).aspx