I'm trying to execute the following code in asp.net razor view-
@foreach (var contact in ViewBag.ContactInfo.Rows)
{
if (columnCount>4)
{
<div class="row-fluid">
}
<div class="span4">@ViewBag.SomeText</div>
//This if block is treated as normal text.
if (columnCount > 4)
{
</div>
columnCount = 0;
}
columnCount++;
}
But it gives parse error.
Any help?