You will need to use reflection for that. Here is a snippet of some code I
have written serving a different purpose.
bill
System.Reflection.Assembly ass = System.Reflection.Assembly.LoadFile(
@"C:\inetpub\wwwroot\test\bin\test.dll" );
Type baseType = null;
bool IsPage = false;
string pagename = null;
int badCount = 0;
foreach( Module mod in ass.GetModules() )
{
foreach( Type type in mod.GetTypes() )
{
IsPage = false;
baseType = type;
while ( baseType != typeof( object ) )
{
if ( baseType == typeof( dascweb.Pages.Page ) )
{
IsPage = true;
break;
}
baseType = baseType.BaseType;
}
if ( IsPage )
{
//add the baseType + ".aspx" to get the name of the page. This
is assuming that all your class names mirrors the name of the page
{
}
}
"Yi****@hotmail.com" <Yi****@hotmail.com@discussions.microsoft.com> wrote in
message news:6D**********************************@microsof t.com...
I have a testproject with a number of pages. Here I want to build a Array
with all page-names(physical name & ID's). This array will be used to fill
a listbox/table/ something else.
QUESTION : How to get all pages within your project??