I would like to append to the first line '.OrderBy' and specify a field called 'OrderById'. I'm finding it confusing, i.e. Func & KeySelector etc, i've looked up some examples but not really getting anywhere, cannot find an example that suits what i'm trying to do.
<% foreach (var item in Model.PaymentItemTotals)
{ %>
<tr>
<td><%= Html.Encode(item.Line)%></td>
<td><strong><%= String.Format("{0:C}", item.AmountTotal)%></strong></td>
<td><%= String.Format("{0:C}", item.Amount)%></td>
<td><%= String.Format("{0:C}", item.AmountIndex)%></td>
</tr>
<% } %>
Many thanks in Advance
John