Home > DeveloperSection > Forums > Change background color of table cell or row in asp.net
Ashish Pandey

Total Post:128

Points:898
Posted on    November-13-2014 10:47 PM

 ASP.Net Webforms  CSS 
Ratings:


 1 Reply(s)
 731  View(s)
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)


Manoj Bhatt
Manoj Bhatt

Total Post:153

Points:1079
Posted on    November-14-2014 2:03 AM

<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>


Don't want to miss updates? Please click the below button!

Follow MindStick