Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: conditional formatting in repeater


Message #1 by aarons@u... on Fri, 28 Feb 2003 23:38:24
I'm sure I'm missing something obvious, but how does one modify repeater 
content based on the values in the RepeaterItem.DataItem?

For example, let's say that if value x > 4 I want a .gif to appear next 
to the content. I've tried something like;

<%# DataBinder.Eval(Container.DataItem, "x"))%>
<% if ((int)Container.DataIem["x"] > 4)
....

I've also tried mucking about with the Repeater.ItemCreated event with no 
luck and significant confusion.

Thanks,
Aaron Spitzer
U. of Washington
Dept of Biostatistics


  Return to Index