I want to generate following html
<div id="my-grid" class="isotope">
<div class="myProject-item">....</div>
<div class="myProject-item">....</div>
<div class="myProject-item">....</div>
<div class="myProject-item">....</div>
</div>
basically every 4th row (I have more than 200 rows) (div with class myProject-item) should be wrapperd inside <div id="my-grid" class="isotope">
so I tried following
@{
var counter = 0;
for (int i = 1; i < 200; i++)
{
counter++;
if (counter % 4 == 0)
{
<text><div id="my-grid" class="isotope"></text>
}
<div class="myProject-item">....</div>
if (counter % 4 == 0)
{
</div> // ***** on this line render breaks ******
}
}
}
Parser Error Message: Encountered end tag "div" with no matching start tag. Are your start/end tags properly balanced?
<text></text>is treated as content block - Satpal