954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Global property

Hi.... All Can any one solve this.... i have an application it contain many aspx pages. here i am collecting all controls id's(ex:label1,texbox1,grid1.....etc ) from all page in the application till its working fine.... now i want to collect text property of that contros(ex: label1 have text property StudentId ...etc) how i can do it....

here i have code to collect all controls:

Assembly getAss = Assembly.GetExecutingAssembly();

Type[] Get = getAss.GetTypes();

foreach (Type t in Get)

{

ddCntrl.Items.Clear();

FieldInfo[] myFieldInfo = t.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public | BindingFlags.GetField); PropertyInfo[] properties = t.GetProperties();

for (int i = 0; i < myFieldInfo.Length; i++)

{

string str = myFieldInfo[i].Module.ToString();

string strName = myFieldInfo[i].Name;

Type TypDeclaringType = myFieldInfo[i].DeclaringType;

Boolean blnIsPublic = myFieldInfo[i].IsPublic;

MemberTypes mtMemberType = myFieldInfo[i].MemberType;

Type TypFieldType = myFieldInfo[i].FieldType;

Boolean blnIsFamily = myFieldInfo[i].IsFamily;

if (TypFieldType.Name == "Label")

{

ddCntrl.Items.Add(strName);//its collect all controls id's

}

ravinaik_2002
Newbie Poster
1 post since Oct 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You