Add Attribute (System.Attribute variety) to .aspx page - not the code-behind
- by Macho Matt
I am creating a custom Attribute (extending System.Attribute).  I know I can put it on another class easily enough by doing the following.
[MattsAttribute]
public class SomeClassWhichIsACodeBehind {
However, I need to be able to test this attribute easily, and putting it in the code-behind would cause a lot of extra effort to get it deployed to an environment which would respond to the behavior of attribute.
What I would like to do:  declaratively apply this attribute to the .aspx page itself (which is really just another class that inherits from the code-behind).  Is this possible?  If so, what is the proper syntax for doing this?