Reputation: 753
I have a Repeater nested in another Repeater. For clarity, we'll refer to them as ParentRepeater
and ChildRepeater
. I need to get a value from ParentRepeater
in ChildRepeater
. How can I do this?
Upvotes: 0
Views: 357
Reputation: 46909
In the child repeater item the first NamingContainer is the Repeater and the second the parent Repetaer item.
<%# DataBinder.Eval(((RepeaterItem)Container.NamingContainer.NamingContainer).DataItem, "Name") %>
Upvotes: 1