C# OutOfMemoryException
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>
       <% } %>
C# OutOfMemoryException
===

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>
       <% } %>