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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:24:54+00:00 2026-05-23T01:24:54+00:00

I have 2 Repeaters one inside another. <div id=result> <asp:Repeater runat=server id=results> <Itemtemplate> <asp:Button

  • 0

I have 2 Repeaters one inside another.

<div id="result">
    <asp:Repeater runat="server" id="results">
        <Itemtemplate>
            <asp:Button ID="Button1" runat="server" Text="Add Color"></asp:Button>
            <asp:Repeater runat="server">
                <Itemtemplate>
                    <tr class="gradeX odd">
                        <asp:Button ID="Button2" runat="server" Text="Add Size"></asp:Button>
                        <td><asp:TextBox ID="TextBox1" runat="server"></asp:TextBox></td>
                        <td><asp:TextBox ID="TextBox2" runat="server"></asp:TextBox></td>
                    </tr>
                </Itemtemplate>
                </asp:Repeater>
        </Itemtemplate>
    </asp:Repeater>
</div>

And on PageLoad I am populating both with DataBinding to List and List. The Button1 and Button2 is responsible for adding rows to each Repeater when clicked. The code is adding the rows to both perfectly but I noticed when I click the Buttons the data from the textbox isn’t posted to the server so I collect from code behind. Is there something wrong I am doing?

  • 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-23T01:24:54+00:00Added an answer on May 23, 2026 at 1:24 am

    Make sure you re-bind your data on page postback as well. Page control tree needs to be recreated before you can access the posted values.

    If you re-create and add the control in page_load, it would allow you to access the post back value, but any view state changes may get lost/over written.

    If you can, then recreating the control tree in page_init results in cleanest solution as it would allow the dynamic controls view state to restored properly.

    Read this excellent article on Dynamic Web Controls, Postbacks, and View State

    Adding Controls at the Right Time

    We already know that when adding controls dynamically through the page’s code portion the controls must be added on every postback. But when in the page lifecycle should the controls be added? At first guess, we might decide to put such code in the Page_Load event handler, causing the controls to be added during the Load stage of the page’s lifecycle. This would work fine if we don’t need to worry about saving the controls’ view state across postbacks, but if we do need to persist the view state of the dynamically added controls the Load stage is not where we should be adding these controls.

    See following for The ASP.NET Page Life Cycle

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

Sidebar

Related Questions

I have Repeater Control and in that i have code like this <div runat=server
I have Repeater Control as shown below. <asp:Repeater ID=rptCategory runat=server> <HeaderTemplate> <h2 class=art-logo-text style=margin-bottom:
I have one control named thumbviewer inside repeater. I want to set its imageurl
I have one requirement. I have a repeater in the usercontrol and devexpress button
I have two repeater which are nested..Means there is one repeater and inside that
i have small problems with asp:Repeater. I am printing <ol><li> tags inside repeater in
I have a repeater containing, amongst others, two buttons. One of the buttons is
I have a repeater control that contains an ItemTemplate containing a databound label and
I have a Repeater control that is being bound to the result of a
I have a repeater of div's that look a little bit like this: <div

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.