TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Resmi Satish
NA
110
74.7k
Get controls from an assembly
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.
Code:
var curAssemble = System.Reflection.Assembly.GetExecutingAssembly();
System.Type[] ExistingTypes = curAssemble.GetTypes();
foreach (Type pagetype in ExistingTypes)
{
ListItem lst = new ListItem();
lst.Text = pagetype.Name;
ddlPageName.Items.Add(lst);
}
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.
Reply
Answers (
0
)
Employee Program
char only domain name expression for email