gladyssann

Index.cshtml

Jan 5th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. @model IEnumerable<OverTime.Models.UserModel>
  2.  
  3. @{
  4. ViewBag.Title = "Index";
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. }
  7.  
  8. <h2>Index</h2>
  9.  
  10. <p>
  11. @Html.ActionLink("Create New", "Create")
  12. </p>
  13. <table class="table">
  14. <tr>
  15. <th>
  16. @Html.DisplayNameFor(model => model.usr_Id)
  17. </th>
  18. <th>
  19. @Html.DisplayNameFor(model => model.username)
  20. </th>
  21. <th>
  22. @Html.DisplayNameFor(model => model.email)
  23. </th>
  24. <th>
  25. @Html.DisplayNameFor(model => model.password)
  26. </th>
  27. <th></th>
  28. </tr>
  29.  
  30. @foreach (var item in Model) {
  31. <tr>
  32. <td>
  33. @Html.DisplayFor(modelItem => item.usr_Id)
  34. </td>
  35. <td>
  36. @Html.DisplayFor(modelItem => item.username)
  37. </td>
  38. <td>
  39. @Html.DisplayFor(modelItem => item.email)
  40. </td>
  41. <td>
  42. @Html.DisplayFor(modelItem => item.password)
  43. </td>
  44. <td>
  45. @Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
  46. @Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
  47. @Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })
  48. </td>
  49. </tr>
  50. }
  51.  
  52. </table>
Advertisement
Add Comment
Please, Sign In to add comment