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

  • Home
  • SEARCH
  • 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 6239953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:28:49+00:00 2026-05-24T11:28:49+00:00

I have nested repeaters on my aspx page.In the outer repeater I am displaying

  • 0

I have nested repeaters on my aspx page.In the outer repeater I am displaying a list of products and in the inner repeater I am displaying a list of additional options associated with each product.The inner repeater contains a checkbox,textbox,label and other stuff.I would like to find the controls inside the outer repeater when a user selects a checkbox in the inner repeater.In order to handle this I am using the following code.

<asp:Repeater ID="OuterRepeater" runat="server" 
        onitemdatabound="OuterRepeater_ItemDataBound" >
        <ItemTemplate>
    <asp:Label ID="CodeLabel" runat="server" Text='<%# Eval("Code") %>'></asp:Label>
     <asp:Repeater ID="InnerRepeater" runat="server" OnItemCreated="InnerRepeater_ItemCreated">
       <ItemTemplate>
    <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="true"/> 
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> 
      ......
      .......
    </ItemTemplate>
    </asp:Repeater>
     ......
      ......
    </ItemTemplate>
    </asp:Repeater>


 protected void InnerRepeater_ItemCreated(object sender, RepeaterItemEventArgs e)
        {
            RepeaterItem ri = (RepeaterItem)e.Item;

            if (ri.ItemType == ListItemType.Item || ri.ItemType == ListItemType.AlternatingItem
            )
            {
                CheckBox cb = ri.FindControl("CheckBox1") as CheckBox;
                cb.CheckedChanged += new EventHandler(CheckBox1_CheckedChanged);
            }
        }

private void CheckBox1_CheckedChanged(object sender, EventArgs e)
        {          

            CheckBox cb = (CheckBox)sender;
            if (cb.Checked)
            {
                //do something
            }
            else
            {
              //do something
            }
        }

But the checkedChanged event of the checkbox is not firing for some reason.Also I am not sure how to access the textbox of the outer repeater in the checked changed event of the innter repeater checkbox control.

Could someone please help me with this?

Thanks

  • 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-24T11:28:50+00:00Added an answer on May 24, 2026 at 11:28 am

    It does not fire the CheckedChanged event, since you have declared the event handler as private, You have to make it Protected or Public

    Protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
    

    You can access the Textbox control like..

    private void CheckBox1_CheckedChanged(object sender, EventArgs e)
    { 
      CheckBox checkBox = (CheckBox)sender;
      Textbox textbox1 = (TextBox)checkBox.Parent.FindControl("TextBox1");
      String textboxText = textbox1.Text;
    }
    
    • 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 an ASP.NET page that uses a repeater nested within another repeater to
I have two nested repeaters in C#. The outer has some grouping information and
I've got a Repeater displaying a list of Countries, and nested within this is
I have nested repeaters and checkbox in each row(like a tree view or ctaegory
I have nested repeaters like this: <asp:Repeater ID=rptQuestoes runat=server> <HeaderTemplate> <ol class=orderedList> </HeaderTemplate> <ItemTemplate>
I have a nested repeater control that displays a list of data, in my
I have nested repeater. And in child repeater there is a dropdownlist for each
I have a case of nested repeaters where a child repeater is nested in
I have a user control nested in a repeater. Inside my user control I

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.