Within my asp.net application, I am implementing a grid-view control where I am populating data into a label
element within the grid-view
.
If the data happens to be empty, I want the row color to be displayed in red.
However, if there is data to bind, I would like the row color to be green.
Here is the code snippet I am using:
<asp:TemplateField HeaderText="Holiday Region">
<ItemTemplate>
<asp:Label ID="lblholdareg" runat="server" Text='<%# Eval("Holidaregion") %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>