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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:21:19+00:00 2026-06-11T06:21:19+00:00

I am wondering why .Net Table rows are being added to the same line

  • 0

I am wondering why .Net Table rows are being added to the same line instead of multiple lines?

Specifically the problem is with this code:

this.table.Rows.AddAt(0,labels);
this.table.Rows.AddAt(1,fields);
this.table.Rows.AddAt(2,submits);

table is a WebControls.Table
labels, fields and submits are TableRows
which all include TableCells.

But when I look at it in the browser it is represented like < tr > “all the rows and columns”

< /tr >

and then two empty

< tr > < /tr > < tr > < /tr >

tags..?

So it adds all the content of the cells and the rows and it even adds three rows but for some reason it puts all the info in the first

< tr >
tag.

Any ideas what I’m doing wrong?

<table border="0">
        <tr>
            <td><span>please enter the title of the interaction here</span></td><td><span>please enter the description of the interaction here</span></td><td><span>please select the impact level of the interaction here</span></td><td><span>please select the urgency level of the interaction here</span></td><td><span>please enter the contact of the interaction here</span></td><td><input name="ctl00$PlaceHolderMain$ctl00$ctl06" type="text" value="one" /></td><td><input name="ctl00$PlaceHolderMain$ctl00$ctl07" type="text" value="two" /></td><td><select name="ctl00$PlaceHolderMain$ctl00$ctl08">
                <option selected="selected" value="1">Low</option>
                <option value="2">Medium</option>
                <option value="3">High</option>

            </select></td><td><select name="ctl00$PlaceHolderMain$ctl00$ctl09">
                <option selected="selected" value="1">Low</option>
                <option value="2">Medium</option>
                <option value="3">High</option>

            </select></td><td><input name="ctl00$PlaceHolderMain$ctl00$ctl10" type="text" value="con" /></td><td rowspan="3"><input type="submit" name="ctl00$PlaceHolderMain$ctl00$ctl11" value="Create Interaction" /></td><td rowspan="2"><span>No interactions created yet</span></td>
        </tr><tr>

        </tr><tr>

        </tr>
    </table>
  • 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-11T06:21:21+00:00Added an answer on June 11, 2026 at 6:21 am

    You can try with this code, by passing cell container

    /adding first row
    TableRow row1 = new TableRow();
    
    //adding first cell
    TableCell cell1 = new TableCell();
    
    //adding label
    Label text1 = new Label();
    text1.Text = "Just test";
    
    cell1.Controls.Add(text1);
    row1.Controls.Add(cell1);
    table1.Controls.Add(row1);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This keeps me wondering why Guid in .NET does not have IsNullOrEmpty() method (where
It is a question for SQL Server 2008 and .NET code. I am wondering
I'm working on an application in ASP.NET, and was wondering specifically how I could
Wondering if anyone can help with this. I have a table with some fixed
UPDATE: For anyone else wondering about this, check out the comment at http://www.php.net/manual/en/function.imagecreatefromstring.php#31178 I
I have a table with 3 rows, each with an ASP.NET panel with a
I'm wondering, why this double border on table TDs won't show in Chrome but
I my asp.net website project with c# code, I have a table in which
I was wondering whether the .Net HashSet<T> is based completely on hash codes or
I'm using Elmah with ASP.NET and wondering how I would add custom data, such

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.