P
Per Bolmstedt
(This question has been asked previously in this group, but I don't
think it was ever really properly answered.)
I want to use reflection - preferably - to find all Web Forms in my web
site that inherit my base page class (which in turn inherits
System.Web.UI.Page). Behold the following code:
For Each asm As System.Reflection.Assembly In
System.AppDomain.CurrentDomain.GetAssemblies()
For Each mdl As System.Reflection.Module In asm.GetModules()
For Each typ As System.Type In mdl.GetTypes()
If typ.IsSubclassOf(GetType(MyBasePage))
..
This code only seems to list Web Forms that have actually been run. Why
is that? Even pages within the same assembly don't show up until they
have been run. Also, this behaviour is the same in the ASP.NET
Development Server and a web site published with the ASP.NET compiler
running in IIS.
Is there another, better, way to find a list of all Web Forms in a web
site?
I want to avoid having to inspect all DLL files in ~/bin/...
think it was ever really properly answered.)
I want to use reflection - preferably - to find all Web Forms in my web
site that inherit my base page class (which in turn inherits
System.Web.UI.Page). Behold the following code:
For Each asm As System.Reflection.Assembly In
System.AppDomain.CurrentDomain.GetAssemblies()
For Each mdl As System.Reflection.Module In asm.GetModules()
For Each typ As System.Type In mdl.GetTypes()
If typ.IsSubclassOf(GetType(MyBasePage))
..
This code only seems to list Web Forms that have actually been run. Why
is that? Even pages within the same assembly don't show up until they
have been run. Also, this behaviour is the same in the ASP.NET
Development Server and a web site published with the ASP.NET compiler
running in IIS.
Is there another, better, way to find a list of all Web Forms in a web
site?
I want to avoid having to inspect all DLL files in ~/bin/...