 <p>You can also achieve this in the markup.</p> <pre><code>&lt;asp:ListItem Text="Good" Value="True" style="background-color:green;color:white" /&gt; &lt;br /&gt; &lt;asp:ListItem Text="Bad" Value="False" style="background-color:red;color:white" /&gt; </code></pre> <p>The word Style will be underlined with the warning that <em>Attribute 'style' is not a valid attribute of element 'ListItem'.</em>, but the items are formatted as desired anyway.</p>