Decorating Derived Page Classes with Custom Attributes



I've created a couple of custom class attributes to decorate derived Page classes in my ASPNET application. To access them, I use
the following pattern:

[CustomAttribute(some stuff)]
public partial class DerivedPage : BasePage
{
}

public class BasePage : Page
{
public BasePage()
{
CustomAttribute[] attrs = (CustomAttribute[]) this.GetType().GetCustomAttributes(typeof(CustomAttribute), true);
// there are no attributes!!
}
}

This pattern works fine in every Windows Forms app I've ever written that uses custom attributes.

Is there some aspect of ASPNET that prevents it from working?

- Mark
.


Loading