I am trying to iterate a list for only first half of the items, and then again i want to iterate a list for only the remaining other half of the list. Any Ideas ?
@foreach (var category in Model.Categories.OrderBy(i => i.CategoryName))
{
<li>
<div id="category_@(category.SKU)"
class="itemBlock"
onclick="toggle('@(category.SKU)')">
</li>
}
Something like:
Should do the trick, can’t guarantee that the syntax is 100%, but that should give you all you need to do it!