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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:59:36+00:00 2026-05-21T22:59:36+00:00

I have a set textboxes where the user enters something and I use them

  • 0

I have a set textboxes where the user enters something and I use them when they click Submit. I need to add a button that lets them add another identical set of textboxes on the fly, enter data into those and then when the submit button is pressed I need to grab the value from both sets. The amount of added sets of items can be unlimited.

What’s the best way to handle something like this in ASP.NET/C#?

I’ve looked around and have basically only gotten that you can try to use JQuery on the front end which leaves the backend a mess or you can try to use a GridView and rebind it every time with new items which can get messy.

Any better/easier way to do this?

Thanks for the help.

  • 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-21T22:59:37+00:00Added an answer on May 21, 2026 at 10:59 pm

    Use a Repeater control for the first set of text boxes, and have it repeat for each extra listing.

    Here’s my comment control repeater. It’s a little arcane, as it was the first control I ever made in asp.net, but it should get you going.

    <asp:Repeater runat="server" ID="repeater" 
      onitemdatabound="repeater_ItemDataBound"
      >
      <HeaderTemplate>
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
      </HeaderTemplate>  
      <FooterTemplate>
        </table>
      </FooterTemplate>
      <ItemTemplate>
        <tr id="trContents" runat="server"><td>
          <table id="tableComment" runat="server"
            width="100%" style="border-color:Black; border-width:1px; border-style:solid;background-color:#EEEE99">
            <tr><td id="tdHeader" runat="server"
               style="border-color:Black; border-width:1px; border-style:solid;padding: 5px">
              <table width="100%" id="tableHeader" runat="server">
                <tr>
                  <td>
                    <asp:Label ID="headerText" runat="server" 
                      Text="<%# GetHeader((CommentRecord)Container.DataItem) %>" />
                  </td>
                  <td style="text-align:right"> <%-- OnClientClick="aspnetForm.target ='_blank';"  --%>
                    <asp:Button ID="btnEdit" runat="server" Text="Edit" 
                        PostBackUrl="<%$ AppSettings:TextEditor %>"  
                        />
                    <asp:Button ID="btnReply" runat="server" Text="Reply" 
                        PostBackUrl="<%$ AppSettings:TextEditor %>"  
                        />
                  </td>
                </tr>
              </table>
            </td></tr>
            <tr><td style="border-color:Black; border-width:1px; border-style:solid;background-color:#FFFFF0;padding: 10px">
                <%# ((CommentRecord)Container.DataItem).Text %>
            </td></tr>
            <tr><td>
              <table width="100%"><tr>
                <td style="text-align:left">
                    <asp:Button ID="btnDelete" runat="server" Text="Delete" 
                        CausesValidation="False" />
                </td>
                <td style="text-align:right">
                  <asp:Label ID="footer" runat="server" Text="<%# GetFooter((CommentRecord)Container.DataItem) %>" />
                </td>
              </tr></table>
            </td></tr>
          </table>
          <asp:PlaceHolder ID="placeHolder" runat="server" />
        </td></tr>
      </ItemTemplate>
    </asp:Repeater>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a few textboxes that are not required. If the user enters nothing
I have a user control that is comprised of 3 textboxes, 3 buttons and
I have a set of textboxes on a form, called sm1, sm2 etc, and
We have set up a system where notifications get sent to a user with
I have set up a Django application that uses images. I think I have
I have a web page that uses three controls to allow a user to
In my current application I have a form that requires the user to enter
I have a few textboxes. I'd like to point the user each time to
What I would like to do is have the user add a new record
I have written a set of functions to validate the textboxes in my form

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.