Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 30th, 2011  |  syntax: HTML 5  |  size: 0.90 KB  |  views: 124  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. @model IEnumerable<FirstWeb.Models.Picture>
  2.  
  3. @{
  4.     ViewBag.Title = "Index";
  5. }
  6.  
  7. <h2>Index</h2>
  8.  
  9. <p>
  10.     @Html.ActionLink("Create New", "Create")
  11. </p>
  12. <table>
  13.     <tr>
  14.         <th>
  15.             Title
  16.         </th>
  17.         <th>
  18.             Path
  19.         </th>
  20.         <th>
  21.             ConcertYear
  22.         </th>
  23.         <th>
  24.             Title
  25.         </th>
  26.         <th>
  27.             Path
  28.         </th>
  29.         <th>
  30.             ConcertYear
  31.         </th>
  32.     </tr>
  33. @bool even = false;
  34. @foreach (var item in Model) {
  35.    
  36.     <tr>
  37.         <td>
  38.             @Html.DisplayFor(modelItem => item.Title)
  39.         </td>
  40.         <td>
  41.             <a href=@Html.DisplayFor(modelItem => item.Path)><img src=@Html.DisplayFor(modelItem => item.Path) width="250px"  /> </a>
  42.         </td>
  43.         <td>
  44.             @Html.DisplayFor(modelItem => item.ConcertYear)
  45.         </td>
  46.     </tr>
  47. }
  48.  
  49. </table>