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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:26:29+00:00 2026-05-25T16:26:29+00:00

I am trying to add a border to just one HtmlRow in C#. The

  • 0

I am trying to add a border to just one HtmlRow in C#. The row is going in a table that has a border around it’s edge. I have tried:

row.Attributes.Add("border-bottom", "1px");
row.Attributes.Add("border-color", "#000000");
row.Attributes.Add("border-style", "solid");
row.Style.Add("border-width", "1px");
row.Style.Add("border-color", "#000000");
row.Style.Add("border-style", "solid");
row.BorderColor = "#000000";

resulting html for the row:

<tr class="tableHeader" Style="height:30px;border-width:1px;border-color:#000000;border-style:solid;" border-bottom="1px" border-color="#000000" border-style="solid" bordercolor="#000000">

<tr class="tableHeader" Style="height:30px;border-width:1px;border-color:#000000;border-style:solid;" border-bottom="1px" border-color="#000000" border-style="solid" bordercolor="#000000">
    <td width="25px" align="center"><FONT COLOR=#000000>Last</FONT></td>
    <td width="50px" align="center"><FONT COLOR=#000000>First</FONT></td>
    <td align="center" width="100px"><FONT COLOR=#000000>Address</FONT></td>
    <td width="50px" align="center"><FONT COLOR=#000000>Phone</FONT></td>
</tr>

But none of these have worked. I cannot use a table to make the border because the row is being used to model subsequent rows. Also, if this makes it easier, I only need the bottom of the row to have a border.

  • 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-25T16:26:30+00:00Added an answer on May 25, 2026 at 4:26 pm

    you should probably looking to put the style in a style sheet and use a class. it will also make it easier for you to test as you just need to add the style at run time and not each element that create the desired effect.

    how about this http://jsfiddle.net/yQbTp/1/

    <table id="border">
        <tr>
            <td>apple</td>
            <td>banana</td>
        </tr>
        <tr class="border">
            <td>cherry</td>
            <td>date</td>
        </tr>
        <tr>
            <td>egg</td>
            <td>fruit</td>
        </tr>
        <tr>
            <td>grape</td>
            <td>ham</td>
        </tr>
    </table>
    table#border{
        width:100%;
        border:1px solid black;
    }
    table#border tr.border{
        border:1px solid red;
    }
    table#border tr:last-child{
        border:1px solid green;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to add a curved border around an image downloaded and to
I have a table with multiple tbody's, each of which has a classed row,
I am trying to add a border att tha bottom of my textrured window
I'm trying add a tab to my web page that looks like this: Using
trying to add an ExpiresDefault ExpiresByType to content on my website so that way
I am trying to add subviews to my UITableView cells. It works just perfect
So I am trying to add an icon to an image, once someone has
I'm trying to add 3 panels to the border layout only North South and
I'm trying to add an icon which sits on top of the border, splitting
I got a problem :S I'm trying to add a div and a table

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.