Can anyone help me.
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
}