fork download
  1. @model IList<Simpleproject.Models.Product>
  2.  
  3. @{
  4. ViewBag.Title = "Products";
  5. }
  6.  
  7. <h2 class="center">Products</h2>
  8.  
  9. <table class="Products">
  10. @* header *@
  11.  
  12. <tr>
  13. <th>ID</th>
  14. <th>Name</th>
  15. <th>Number</th>
  16. <th>Color</th>
  17. <th>Standard Cost</th>
  18. <th>List Price</th>
  19. <th>Size</th>
  20. <th>Weight</th>
  21. </tr>
  22. @{int i = 1;}
  23. @foreach (var p in Model)
  24. {
  25. <tr class="@(i++ % 2 == 0 ? "highlighted" : "")">
  26. <td>@p.ProductID</td>
  27. <td>@p.Name</td>
  28. <td>@p.ProductNumber</td>
  29. <td>@p.Color</td>
  30. <td>@p.StandardCost</td>
  31. <td>@p.ListPrice</td>
  32. <td>@p.Size</td>
  33. <td>@p.Weight</td>
  34. </tr>
  35. }
  36.  
  37. </table>
  38.  
  39. <div class = "pagination">
  40. Page:
  41. @for (int p = 1; p <= ViewBag.TotalPages; p++)
  42. {
  43. <a class="@(p==ViewBag.CurrentPage ? "Current" : "")"
  44. href="@Url.Action("products","home",new{page = p})">@p</a>
  45. }
  46. </div>
  47.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(3,2): error CS1646: Keyword, identifier, or string expected after verbatim specifier: @
prog.cs(1,27): error CS1525: Unexpected symbol `.', expecting `,' or `>'
prog.cs(3,2): error CS1646: Keyword, identifier, or string expected after verbatim specifier: @
prog.cs(3,2): error CS8025: Parsing error
Compilation failed: 4 error(s), 0 warnings
stdout
Standard output is empty