Here are some samples
Early versions of Visual Basic ASP.Net forms provided a backColor and foreColore attributes.
While these work, the recommended method is to use control styles, and place those styles within a CSS page.
In any case, here is how you used to do coloring in ASP.Net
1 | e.Cell.BackColor = System.Drawing.Color.Linen |
Here’s how to assign a color from a number
1 | Dim Color(4) As System.Drawing.Color |
Here’s how to set the color from a string variable
1 | e.Cell.BackColor = System.Drawing.Color.FromName("Yellow") |