string myProps = "FormView1.PageIndex"; string[] info = myProps.Split('.'); Type formType = this.GetType(); System.Reflection.FieldInfo formInfo = formType.GetField(info[0], System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); object control = formInfo.GetValue(this); Type propertyType = control.GetType(); System.Reflection.PropertyInfo controlInfo = propertyType.GetProperty(info[1]); object propertyValue = controlInfo.GetValue(control, null);This (might) be the VB.NET version - I ran it through a translator so it might be a bit weird. For instance, I think the info(0) and info(1) should probably be info(1) and info(2).
Dim myProps As String = "FormView1.PageIndex" Dim info As String() = myProps.Split(Microsoft.VisualBasic.ChrW(46)) Dim formType As Type = Me.GetType() Dim formInfo As System.Reflection.FieldInfo = formType.GetField(info(0), System.Reflection.BindingFlags.NonPublic Or System.Reflection.BindingFlags.Instance) Dim control As object = formInfo.GetValue(Me) Dim propertyType As Type = control.GetType() Dim controlInfo As System.Reflection.PropertyInfo = propertyType.GetProperty(info(1)) Dim propertyValue As object = controlInfo.GetValue(control, Nothing)