Quantcast
Channel: Wrap part of a foreach loop in a div - Stack Overflow
Browsing latest articles
Browse All 3 View Live

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 Article



Answer 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 Article

Wrap 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
Browsing latest articles
Browse All 3 View Live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>