T
ThunderMusic
Hi,
I have a custom WebControl. I fire an event and send, as the EventArg,
another WebControl that contains sub controls (ParseChildren(true))... It
can contain anything, but I want to find one control... Let's say the
control I want to find is "myControl". So I call
e.theObject.FindControl("myControl"); It always returns null and I know the
name of the control is good (that's the ID I gave it, is it possible it has
changed because it's the child of a WebControl?). When I look at "theObject"
in the Watch window, I got to it's base (WebControl), the to the "Controls"
property, then to the non-public fields to find the collection of controls
it contains and I find my object with the name I want...
The question is... Is there a way for the FindControl function not to find a
control contained in the Controls collection? It's there for sure, why
FindControl does not find it?
thanks
ThunderMusic
I have a custom WebControl. I fire an event and send, as the EventArg,
another WebControl that contains sub controls (ParseChildren(true))... It
can contain anything, but I want to find one control... Let's say the
control I want to find is "myControl". So I call
e.theObject.FindControl("myControl"); It always returns null and I know the
name of the control is good (that's the ID I gave it, is it possible it has
changed because it's the child of a WebControl?). When I look at "theObject"
in the Watch window, I got to it's base (WebControl), the to the "Controls"
property, then to the non-public fields to find the collection of controls
it contains and I find my object with the name I want...
The question is... Is there a way for the FindControl function not to find a
control contained in the Controls collection? It's there for sure, why
FindControl does not find it?
thanks
ThunderMusic