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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:11:51+00:00 2026-05-20T23:11:51+00:00

campbell suggested I ask a new question for this issue so here I go.

  • 0

campbell suggested I ask a new question for this issue so here I go.

I have an ASP:Table that has one row in by default. I would like to give the user the ability to, by clicking a button, add the same row again to enable more data entry. The end result being that I can commit the data in the rows to a SQL database.

My Table Code

<asp:Table ID="Table1" runat="server" Height="50%" Width="100%">
            <asp:TableHeaderRow CssClass="lblrow2" HorizontalAlign="Left" BackColor="AliceBlue">
                <asp:TableHeaderCell ID="haccountref">Account Ref:</asp:TableHeaderCell>
                <asp:TableHeaderCell ID="hproduct">Product</asp:TableHeaderCell>
                <asp:TableHeaderCell ID="hqty">Qty:</asp:TableHeaderCell>
                <asp:TableHeaderCell ID="hunitprice">Unit Price:</asp:TableHeaderCell>
                <asp:TableHeaderCell ID="hdiscount">Discount:</asp:TableHeaderCell>
                <asp:TableHeaderCell ID="htotal">Total Line Amount:</asp:TableHeaderCell>
            </asp:TableHeaderRow>
            <asp:TableRow CssClass="r1">
                <asp:TableCell><asp:TextBox ID="vaccountref" ReadOnly="True" runat="server"></asp:TextBox></asp:TableCell>
                <asp:TableCell><asp:DropDownList runat="server" ID="vproduct"></asp:DropDownList></asp:TableCell>
                <asp:TableCell><input id="Qty" type="text" /></asp:TableCell>
                <asp:TableCell><input id="Unit Price" type="text" /></asp:TableCell>
                <asp:TableCell><input id="Discount" type="text" /></asp:TableCell>
                <asp:TableCell><input id="Total" type="text" /></asp:TableCell>
                <asp:TableCell><input id="Button1" type="image" src="plusButton.png" value="button" /></asp:TableCell>
            </asp:TableRow>
        </asp:Table>

The question here is how would I achieve this properly and will I then be able to send the data as separate rows to SQL?

Thanks in advance

Justin

  • 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-20T23:11:51+00:00Added an answer on May 20, 2026 at 11:11 pm

    If you break the question down these are the steps you need to follow

    1. Add input fields such as Textboxes to the page which the user can fill.
    2. Add a button which will submit this new entry.
    3. In your button click handler create a new tablerow and populate it with the new data the user has supplied.
    4. When the user wants to save the table to the database you just loop through all the rows in the table and insert them.

    I can elaborate further on each step but this series of steps is one way to do it and shouldn’t be too difficult.

    Take a look at the section in this article on adding a row to a table http://www.developerfusion.com/article/4410/in-depth-aspnet-using-adonet/4/

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

Sidebar

Related Questions

In response to this question asking about hex to (raw) binary conversion, a comment
I'm using Charles Campbell's MPage[0] plugin to get multiple pages open, so I have
(There's a tiny bit of history to this question, please bear with me) In
UPDATE I have combined various answers from here into a 'definitive' answer on a
From .NET Rocks! Show #488 : Richard Campbell: In the GDI world we got
Attempting to learn functional C#, I ported Dustin Campbell's fibonacci example to C#3. My
I have a query in which I am pulling the runtime of an executable.
After I've seen this PDC session I wanted to try to learn a bit
I'm writing a search feature for a database of NFL players. The user enters
I want my search results to be in order of string position from smallest

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.