Re: Decorating Derived Page Classes with Custom Attributes



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
.



Relevant Pages

  • Re: How does global.mpt work in Project 2007?
    ... features that make things very confusing. ... One problem is that the Application Data folder is a hidden folder, ... I created a custom toolbar and a custom view ... the custom toolbar and custom view show up in the Organizer as ...
    (microsoft.public.project)
  • Re: which is better practice
    ... You're right, of course, but IMO _that_ is bad practice; Declaring ... variables inside statements can be confusing (and hard to spot later ...
    (comp.lang.perl.misc)
  • Re: Generics for Delphi
    ... alike, but aren't. ... And folks think that C# is confusing? ... declaring and using an event ...
    (borland.public.delphi.non-technical)
  • how to declare globally unique identifier (GUID)
    ... i looking for example of declaring and use of GUID, the msdn example is very ... confusing, can anyone help me? ...
    (microsoft.public.dotnet.languages.vb)
  • Re: how to declare globally unique identifier (GUID)
    ... > i looking for example of declaring and use of GUID, the msdn example is very ... > confusing, can anyone help me? ... Public Declare Auto Function SetupDiGetClassDevs Lib "Setupapi.dll" _ ...
    (microsoft.public.dotnet.languages.vb)

Loading