Can I use Eval or similar syntax in the SeparatorTemplate of the repeater?
Id 'would like to display some information about the last element in the delimiter pattern, for example:
<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>
Skipping that it will 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 ignore the Eval () call. I also tried using the previous syntax as follows: <% # DataBinder.Eval (Container.DataItem, "ArrivalAirport")%> with the same results.
Is it possible to display the information of the previous item in a SeparatorTemplate? If not, can you suggest an alternative way to generate this code?
thanks
Jack brown
source share