I have an ItemTemplate within a Repeater. Here's my code (forgive the inline styling, I just threw this together):
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<div style="background-color: Silver; border-style: solid; display: inline-block; float: left; margin: 5px; overflow: hidden;">
<div style="text-align: center">
<asp:Label ID="lblImage" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "image") %>'></asp:Label>
</div>
<div>
<%# DataBinder.Eval(Container.DataItem, "url") %>
</div>
<div style="text-align: center;">
<asp:HyperLink ID="requestLink" runat="server" Text="Original" NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "requestUrl") %>'>
</asp:HyperLink>
</div>
</div>
</ItemTemplate>
</asp:Repeater>
The output, currently, looks like this:
Based on certain conditions within my program, I'd like to change the border color of the item template (Green, yellow, or red). Can I do this in the code behind?