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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:09:27+00:00 2026-06-16T15:09:27+00:00

I want to add controls dynamically through code behind in the following form lblName

  • 0

I want to add controls dynamically through code behind in the following form

lblName   txtName       lblSubject    txtSubject         btnAddNewRow/linkAddNewRow

such that btAddNewRow/linkAddNewRow generates new row at run time below the present row.
Could someone help with the best possible way.
Also Is it possible to use tags only and not table ie td th for formatting. I am using row just to be significant. I do not intend to use table rows.
please consider the prefixes as the type of control.
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-06-16T15:09:30+00:00Added an answer on June 16, 2026 at 3:09 pm

    Basically if your intention is related to data processing, DataGrid and GridView would be good choices.

    Dynamically add ROW instead of table are actually not much different, and I can tell that you will found it not perfectly suitable compared with DataGrid and GridView.

    If you really want to dynamically add row, every time you click what ever buttons(add Row Button or whatever) page will postback and the row you just added will be disappeared.

    what people would usually do is to use session to store the entire table when they create table and add row.

    in Page_Load and also before they add row, they would retrieve the entire table from session. this can help keeping data in original rows.


    But this could be burdensome for you to handle just about each row controls’ ID, format, style etc, and think about when you wanna deal with validation, it could be hell.

    I’m not saying it’s infeasible, because I went through this.

    Another easier way to do is to create a Custom Control by putting an entire row including validation, styles and other thing you need in a Custom Control then dynamically add it in Page (also need Session or ViewState to store it, same thing will happen).

    Hope this could help you to reconsider your design

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

Sidebar

Related Questions

I want to dynamically add chart controls inside my ul tags through code. How
I want to add UILabel controls to my application dynamically from code (programmatically), please
i want to add file(photo) to fileupload control in the c#(code behind) thanks
I want to add a DependencyObject to a control from code behind. I have
I am trying to dynamically add form controls to a gui I'm developing in
I want to add a control to a placeholder dynamically, like this: int fileCount
I am dynamically generating controls, and sometimes I want to create a control and
I am trying to add controls to a UserControl dynamically (programatically). I get a
I am creating ASP.NET textbox controls dynamically. I want to know the difference between
I am adding controls dynamically during runtime using a conrolplace holder. i want to

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.