Hi, is it possible to use Eval or similar syntax in the SeparatorTemplate of a Repeater?
Id' like to display some info of the last item in the separator template like this:
<table>
<asp:Repeater>
<ItemTemplate>
<tr>
<td><%# Eval("DepartureDateTime") %></td>
<td><%# Eval("ArrivalDateTime") %></td>
</tr>
</ItemTemplate>
<SeparatorTemplate>
<tr>
<td colspan="2">Change planes in <%# Eval("ArrivalAirport") %></td>
</tr>
</SeparatorTemplate>
<asp:Repeater>
<table>
Hopping that it'll generate something like this:
<table>
<asp:Repeater>
<tr>
<td>2009/01/24 10:32:00</td>
<td>2009/01/25 13:22:00</td>
</tr>
<tr>
<td colspan="2">Change planes in London International Airport</td>
</tr>
<tr>
<td>2009/01/25 17:10:00</td>
<td>2009/01/25 22:42:00</td>
</tr>
<asp:Repeater>
<table>
But the SeparatorTemplate seems to be ignoring the Eval() call. I tried using also the previous syntax like this: <%# DataBinder.Eval(Container.DataItem, "ArrivalAirport")%> with the same results.
Is it possible to display information of the previous item in a SeparatorTemplate? If not, can you suggest an alternative way to generate this code?
Thanks