GridView Cell Color
<p>I have to fill the cells of a gridview with just color. No text is required in this case. I have a List of Object X 's that I will bind to gridview. Object X has properties that correspond to the grid view. Suppose there is a property called Y in Object X that is a boolean , if Y is false I need to fill the cell with Red and if Y is true I need to fill it with Yellow. </p>

<p>How do I go about doing this ??</p>

<p>I tried something like this:</p>

<pre><code>&lt;asp:TemplateField&gt;
            &lt;HeaderTemplate&gt;Default&lt;/HeaderTemplate&gt;
            &lt;ItemTemplate&gt; 
                &lt;asp:Label ID="Default" 
                    runat="server" 
                    BackColor= '&lt;%# Eval("Default") %&gt;==true:Green:Blue'
                &lt;/asp:Label&gt;
            &lt;/ItemTemplate&gt;
        &lt;/asp:TemplateField&gt;
</code></pre>

<p>It gives me an error saying the server tag is not well formed.</p>

<p>NOTE: I don't need to fill any text in the cell. Just color based on properties of Object X that are boolean.</p>

<p>Hope I have made myself clear..</p>

<p>Any ideas and suggestions are greatly appreciated !</p>
