Advertisement
LYSoft

Users Index View

May 17th, 2014
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.91 KB | None | 0 0
  1. @model IEnumerable<LoganMVC.Models.User>
  2. @{
  3.     ViewBag.Title = "Index";
  4.     Layout = "~/Views/Shared/_Layout.cshtml";
  5. }
  6.  
  7. <h2>Manage Users @Html.ActionLink("New", "Add", "Account", new { createdby = User.Identity.Name })</h2>
  8.  
  9. <table>
  10.     <thead>
  11.         <tr>
  12.             <th>*</th>
  13.             <th>User name</th>
  14.             <th>Email</th>
  15.             <th>Created by</th>
  16.             <th>Created date</th>
  17.         </tr>
  18.     </thead>
  19.     <tbody>
  20.         @foreach (var user in Model)
  21.         {
  22.             <tr>
  23.                 <td>@Html.ActionLink("Edit", "Edit", "Account", new { id = user.UserId }) | @Html.ActionLink("Delete", "Delete", "Account", new { id = user.UserId })</td>
  24.                 <td>@user.Username</td>
  25.                 <td>@user.EmailAddress</td>
  26.                 <td>@user.CreatedBy</td>
  27.                 <td>@user.CreateDate</td>
  28.             </tr>
  29.         }
  30.     </tbody>
  31. </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement