Re: Decorating Derived Page Classes with Custom Attributes
- From: Mark Olbert <ChairmanMAO@xxxxxxxxxxxxxxxxx>
- Date: Mon, 05 Mar 2007 08:44:48 -0800
Walter,
I should've mentioned that I tried your diagnostic and found that the correct Type was being reported. Which was part of what was
confusing me.
It turns out the problem was in how I defined the custom attribute class: I set it to Inherited=false, which kept my code from
"seeing" the attributes...which leads me to another question.
I was suprised that Inherited=false caused a problem, because I've done that in many other Windows.Forms based apps and not had a
problem. I am, after all, asking for the custom attributes decorating the Type that they're declared on, so the issue of whether
they're inherited or not should be moot.
But then I recalled vaguely that the ASPNET engine dynamically creates instances of Page classes on the fly, and that made me wonder
if maybe the instances it was creating weren't, technically, the same Type as the Page classes I was declaring. Does that make
sense? If so, it would explain why Inherited=false hid the attributes.
- Mark
.
- Follow-Ups:
- Re: Decorating Derived Page Classes with Custom Attributes
- From: Walter Wang [MSFT]
- Re: Decorating Derived Page Classes with Custom Attributes
- References:
- Decorating Derived Page Classes with Custom Attributes
- From: Mark Olbert
- RE: Decorating Derived Page Classes with Custom Attributes
- From: Walter Wang [MSFT]
- Decorating Derived Page Classes with Custom Attributes
- Prev by Date: Re: Decorating Derived Page Classes with Custom Attributes
- Next by Date: Re: Why can't user controls be compiled into DLL and shared with other web applications
- Previous by thread: RE: Decorating Derived Page Classes with Custom Attributes
- Next by thread: Re: Decorating Derived Page Classes with Custom Attributes
- Index(es):
Relevant Pages
|
Loading