I have a nested repeater control. Here is what the HTML looks like:
<ItemTemplate>
<div class="boxLeft">
<h4><%# DataBinder.Eval(Container.DataItem, "DisciplineName") %></h4><asp:Label runat="server" ID="lblDisciplineID" Visible="false" Text='<%# DataBinder.Eval(Container.DataItem, "DisciplineID") %>'></asp:Label>
<p><%# DataBinder.Eval(Container.DataItem, "DisciplineNarrative") %></p>
<h5 class="articles"><%# DataBinder.Eval(Container.DataItem, "InstructorCount")%> instructors</h5>
<ul>
<asp:Repeater runat="server" ID="rptRegions">
<ItemTemplate>
<li><a href='/Lessons/<%# DataBinder.Eval(Container.DataItem, "DisciplineName") %>/<%# DataBinder.Eval(Container.DataItem, "CityName") %>'><%# DataBinder.Eval(Container.DataItem, "CityName") %></a></li>
</ItemTemplate>
</asp:Repeater>
</ul>
</div>
</ItemTemplate>
As you can see, I want to access the parent DisciplineName property from the parent repeater, in my child repeater in order to build the URL. I get the following error:
DataBinding: 'GolfLessonSearch.Model.CityEntity' does not contain a property with the name 'DisciplineName'.
This is because it is trying to get "DisciplineName" from the child repeater but I want it from the parent repeater. I thought that the properties may still be in scope but it appears not. Is there any way of getting this?