Get controls from an assembly

Resmi Satish

Resmi Satish

Nov 14 2014 4:07 AM
I am having a webapplication project and I have to fetch the name of the pages using the webapplication dll and display the list of controls in each page.
I have to display the name of the pages in a drop down which I have done.

 var curAssemble = System.Reflection.Assembly.GetExecutingAssembly();
  System.Type[] ExistingTypes = curAssemble.GetTypes();
  foreach (Type pagetype in ExistingTypes)

  ListItem lst = new ListItem();
  lst.Text = pagetype.Name;

  System.Web.UI.Page f = (System.Web.UI.Page)Activator.CreateInstance(pagetype);
  foreach (Control c in f.Controls)

I am not able to get controls from each pages in the application.

Any help from your side is appreciable.