.net MVC 3 multiple columns

Posted by Teodor on Stack Overflow See other posts from Stack Overflow or by Teodor
Published on 2012-04-02T23:26:15Z Indexed on 2012/04/02 23:29 UTC
Read the original article Hit count: 283

Filed under:
|

i want to display a list in more columns with 5 items/column

my code now doesn't work as expected:

@{
    var c=0;
 }

<div >


@foreach (var item in Model) {
     c += 1;
    @Html.ActionLink(item.Judet , "Browse", new { judet = item.Judet }) <br />

     if (c == 5){
         Response.Write("</div><div style='border: 1px solid red;'>");
         c = 0;
     }

}

 </div>

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about asp.net-mvc-3