Problem using FindControl in a Nested Repeater
Posted on 2009-04-14
I'm trying to reference a control in a nested repeater from within the outer repeater's ItemDataBound event.
1) I am assuming that this is possible.
2) I'm obviously not have much luck. While I understand that .FindControl has to be used on the correct container, I'm having problems executing it.
The following code successfully finds the nested repeater...
Dim InnerRepeater As Repeater = CType(e.Item.FindControl("RepeaterDelegates"), Repeater)
However, when I try to get the control that I need, the control isn't found...
Dim NewTargetItem As Object
NewTargetItem = InnerRepeater.FindControl("DirectoryDetailDelegates")
In snooping around, I checked .HasControls on the inner repeater, it returned False which I thought was odd.