I've got the following cshtml code in my razor view.
<div class="col left-col pull-left">
@for (int i = 0; i < @Model.NewsResults.Count; i = i + 2)
{
NewsResult article1 = @Model.NewsResults[i];
<div>@i - @article1.Title @Html.Partial("NewsItemPartial", article1)</div>
}
</div>
The @i ... seems to tell razor to ouput the data. If I leave the out there, nothing renders.
Please explain how I can do what I have below but without having to use the (before the @i).