Answer by Devin Goble for Wrap part of a foreach loop in a div
I misunderstood the original question. Disregard the following:Try something like this instead:@{var j = 0; var count = 10;}@foreach (var item in replies){ if(j <= 2) { Html.RenderPartial("_Reply",...
View ArticleAnswer by SLaks for Wrap part of a foreach loop in a div
You need to prefix the half-tags with @: to prevent Razor from parsing the HTML.
View ArticleWrap part of a foreach loop in a div
I am trying to wrap everything after the second item in a doc. Here's the code that doesn't work. It's being used in a Razor view.@{var j = 0; var count = 10;}@foreach (var reply in...
View Article
More Pages to Explore .....