ASP.NET has a simple method for binding lists to Repeaters and displaying the properties of items contained within the Repeater. The Eval function is the mechanism for handling this and finding information on how to do this is pretty easy:
or
<%# DataBinder.Eval(Container.DataItem, "Property") %>
Where Property is the property to evaluate for the current item within the dataset for the Repeater.
What if you wanted to evaluate the entire Item instead of the property of the item? Primitive types such as Strings or Integers would be candidates for this, but this operation can often be confusing if you don't do it frequently enough. It varys from the common Eval syntax, but is equally simple.
IList<String> tmpStrings = new List<String> { "value1", "value2", "value3" };
rTmp.DataSource = tmpStrings;
rTmp.DataBind();
<Repeater ID="rTmp" runat="server">
<ItemTemplate>
<%# (String)Container.DataItem %>
</ItemTemplate>
</Repeater>
Instead of using Eval to evaluate the property of the current data item, the actual data item is evaluated by using Container.DataItem.