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 6549987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:09:39+00:00 2026-05-25T12:09:39+00:00

i have a repeater inside another repeater. now i want to bind the inner

  • 0

i have a repeater inside another repeater. now i want to bind the inner repeater. but i m getting error of “Object reference not set to an instance of an object.”. my code is

Protected Sub rep_test_ItemDataBound(ByVal sender As Object, ByVal e As   System.Web.UI.WebControls.RepeaterItemEventArgs) Handles rep_test.ItemDataBound
    Dim dt As New DataTable
    dt = obj.getdata()
    Dim innerRepeater As Repeater = DirectCast(e.Item.FindControl("innerRepeater"), Repeater)
    innerRepeater.DataSource = dt
    innerRepeater.DataBind()
End Sub

my source code is

<asp:Repeater ID="rep_test" runat="server">
        <ItemTemplate>
            <div id='h<%# DataBinder.Eval(Container, "ItemIndex") %>' class="header" onclick='ToggleDisplay(<%# DataBinder.Eval(Container, "ItemIndex") %>);'>
                <%#DataBinder.Eval(Container.DataItem, "ID")%>
            </div>
            <div id='d<%# DataBinder.Eval(Container, "ItemIndex") %>' class="details">
            <asp:Repeater ID="rep_hello" runat="server">
            <ItemTemplate>
                <%#DataBinder.Eval(Container.DataItem, "batchid")%><br />
                <%#DataBinder.Eval(Container.DataItem, "ts")%><br />
            </ItemTemplate>
            </asp:Repeater>
            <%--    <%#DataBinder.Eval(Container.DataItem, "batchid")%><br />
                <%#DataBinder.Eval(Container.DataItem, "ts")%><br />--%>
            </div>
        </ItemTemplate>
    </asp:Repeater>
  • 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-25T12:09:39+00:00Added an answer on May 25, 2026 at 12:09 pm

    If you have a header or footer in the parent repeater, your method might be executed for them too, and hence not finding the inner control.

    Try to check if the e.Item.ItemType is “only” either ListItemType.Item or ListItemType.AlternatingItem, and only execute your code in this case.

    Of course can’t guarantee if this is the problem. Check also for confirming that repeater ID is correct, and verify that it’s directly inside the item template of the parent repeater, not inside another server control inside the item (or else, you’ll need to find the other control first and then find the repeater inside it).

    Also, ensure you are using rep_hello ID not innerRepeater.

    BTW< you can do this in the markup too…

    <asp:repeater runat="server" id="innerRepeater"
        DataSource='<%# Eval("PropertyInParentObject") %>'  >
        ....
        ....
    </asp:repeater>
    

    You can use Container.DataItem instead of Eval too (and cast it to the type of the object in parent repeater item).

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

Sidebar

Related Questions

I have one control named thumbviewer inside repeater. I want to set its imageurl
I have a Repeater and inside it a GridView . Now I want to
I have this div inside a repeater, where i set the class, onmouseover and
I have a repeater inside a panel. Inside this repeater I have another panel.Upon
I have 2 Repeaters one inside another. <div id=result> <asp:Repeater runat=server id=results> <Itemtemplate> <asp:Button
Hi have a repeater which is inside a gridview. when i bind the data
I have a repeater with a RadioButtonList inside the ItemTemplate, but when the RadioButtonList.OnSelectedIndexChanged
I have a RadioButtonList inside a Repeater. I have AutoPostback set to true and
I have a Linkbutton inside a repeater and I want to delete the Item
i have a gridview inside a repeater, and a dropdownlist insid the gridview. now

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.