Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to code action-filter attributes for asp.net web form application?

I am using .NET 4.5, VS 2012 to develop a new ASP.NET web form application. My question: is it possible to write custom action filter attributes for that web form application; for example for checking web request, or checking some event handlers. I know in MVC this is absolutely possible. Thanks in advance.

like image 936
Thomas.Benz Avatar asked Jun 01 '13 12:06

Thomas.Benz


1 Answers

WebForms do not have actions so they do not have action filters. You need some other hook mechanism.

I can think of a few:

  1. A Page base class
  2. An IHttpModule
  3. The Application_BeginRequest event and others.
like image 151
usr Avatar answered Sep 23 '22 02:09

usr