Accessing parent data in nested repeater, in the HeaderTemplate
问题 Simple question, not sure there\'s a simple answer! So here\'s the code: (I\'ve simplified it a lot to make it easier to read) <asp:Repeater runat=\"server> <ItemTemplate> <asp:Repeater runat=\"server\"> <HeaderTemplate> <h1>My header here for: <%# OuterContainer.DataItem.MyItemName %> </h1> </HeaderTemplate> <ItemTemplate> My items code here </ItemTemplate> </asp:Repeater> </ItemTemplate> </asp:Repeater> How, in the HeaderTemplate - can I access the DataItem in the parent repeater? 回答1: I