I have a nested FormView and I need to get the Text values from some of its xontrols (TextBox) in code behind.
I can easily pull the values from the "parent" FormView using:
TextBox txtBox = (TextBox)fvParent.FindControl("txtField");String myStr= txtBox.Text;
Although, when I try to get a refence to one of the controls in the "child" FormView I get a null. I am trying to do this:
FormView formView = (FormView)fvParent.FindControl("fvChild");TextBox txtBox = (TextBox)fvChild.FindControl("txtChildField");String myStr= txtBox.Text;
The variable "formView" is set to null. Can the FindControl method not find nested items? If not, what is the proper way of getting the values from these fields (in the Child/Nested FormView)?
Thanks again for everyone's help!
View Complete Post