CHANGE BACKGROUND COLOR OF TABLE CELL OR ROW IN ASP.NET

Ashish Pandey

Total Post:128

Points:898
Posted by  Ashish Pandey
 1547  View(s)
Ratings:
Rate this:
In a Visual Basic WEB APPLICATION program that shows 2 column, multi-row table with questions down the left column, and answers down the right column, how can I set the background color of a specific cell OR an entire row? (that's how I'll indicate selection)
  1. Manoj Bhatt

    Post:154

    Points:1086
    Re: Change background color of table cell or row in asp.net

    <table>

                <tr>

                    <th>Column1</th>

                    <th>Column2</th>

                </tr>

                <tr>

                    <td style="background-color:gray;">Question 1</td>

                    <td>Answer 1</td>

                </tr>

                <tr>

                    <td>Question 2</td>

                    <td>Answer 2</td>

                </tr>

                <tr style="background-color:yellow;">

                    <td>Question 3</td>

                    <td>Answer 4</td>

                </tr>

            </table>

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!