I’m getting an out of memory exception on this loop…however, it never even reaches a second iteration. The date index is 0 when the exception is thrown.
<% int date = 0; %>
<% while (date < Model.TimePeriod1.Count) { %>
<tr>
<% for (int i = 0; i < 7; i++)
{ %>
<td><%: Model.TimePeriod1[date] %></td>
date = date + 1;
<% } %>
</tr>
<% } %>
Your
date = date + 1;is html, not code; hence it never changesdate, hence it fills the entire memory with the output-buffer for lots and lots and lots ofModel.TimePeriod1[0]. Add a bee-sting after the%></td>: