Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7006697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:30:38+00:00 2026-05-27T21:30:38+00:00

I have a nested repeater control. Here is what the HTML looks like: <ItemTemplate>

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:30:39+00:00Added an answer on May 27, 2026 at 9:30 pm

    If the objects behind your DataItems have the same parent/child relationship as you are trying to represent them in the repeater, you can always fully qualify the property name so that your child repeater is calling

    DataBinder.Eval(Container.DataItem, "Parent.DisciplineName")
    

    If this isn’t the case, my gut would be to create a ViewModel object (even though it’s not mvc) of your child object to fake that relationship…

    EDIT

    Just a note that when I said “Parent.DisciplineName”, I meant to replace “Parent” with the object name… (I only qualify because “Parent” is a reserved word in so many other places in asp.net…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two nested repeaters in my *.aspx page. <asp:Repeater runat=server id=rptMain> <ItemTemplate> <h1><%#DataBinder.Eval(Container.DataItem,
I have nested repeaters like this: <asp:Repeater ID=rptQuestoes runat=server> <HeaderTemplate> <ol class=orderedList> </HeaderTemplate> <ItemTemplate>
I have a nested Repeater control in the ItemTemplate of another Repeater. I want
<asp:Repeater ID=Repeater_RatingQuestions_Individuals runat=server> <ItemTemplate> <asp:Label CssClass=bold center ID=Label1 runat=server Text='<%# DataBinder.Eval(Container.DataItem,Question)%>' /> <asp:Repeater ID=Repeater_RatingAnswers_Individuals
I have a user control nested in a repeater. Inside my user control I
I have a nested repeater Because of that no control in my code is
I have a gridview control nested within a repeater control. The repeater control is
I have a complex UI with several nested tables, a repeater control and several
I have a nested repeater set up but the child repeater control is not
Using VS 2008, I have a Repeater control with nested elements and want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.