Can I code action filter attributes for an 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: is it possible to write custom action filter attributes for this web form application; for example, to check a web request or to check some event handlers. I know that in MVC this is absolutely possible. Thanks in advance.

+7
source share
1 answer

WebForms has no actions, so they have no action filters. You need another hook mechanism.

I can think of several:

  • A Page base class
  • An IHttpModule
  • Event Application_BeginRequest and others.
+10
source

All Articles