You will need to use reflection for that. Here is a snippet of some code I
have written serving a different purpose.
bill
System.Reflecti on.Assembly ass = System.Reflecti on.Assembly.Loa dFile(
@"C:\inetpub\ww wroot\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.P age ) )
{
IsPage = true;
break;
}
baseType = baseType.BaseTy pe;
}
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@discussion s.microsoft.com > wrote in
message news:6D******** *************** ***********@mic rosoft.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??