title: .net MVC 3 multiple columns
body: <p>i want to display a list in more columns with 5 items/column</p>
  
  <p>my code now doesn't work as expected:</p>
  
  <pre><code>@{
      var c=0;
   }
  
  &lt;div &gt;
  
  
  @foreach (var item in Model) {
       c += 1;
      @Html.ActionLink(item.Judet , "Browse", new { judet = item.Judet }) &lt;br /&gt;
  
       if (c == 5){
           Response.Write("&lt;/div&gt;&lt;div style='border: 1px solid red;'&gt;");
           c = 0;
       }
  
  }
  
   &lt;/div&gt;
  </code></pre>
  
  <p>When i run the code i get this:
  <img src="https://i.stack.imgur.com/3Cyvo.jpg" alt="enter image description here"></p>