<pre lang="c#">
<table class="table table-striped"> <tr> <th>Title</th> <th>Status</th> <th>User Name</th> </tr> @foreach (var item in Model) { <tr> <td> @Html.DisplayFor(modelItem => item.title) </td> <td> @if (item.status == (short)Online_Book.Models.BookStatus.Available) { <span>Available</span> } else { @Html.DropDownListFor(m => item.status, new SelectList(Online_Book.Models.BookStatus.GetValues(typeof(Online_Book.Models.BookStatus)), item.status), new { @class = "form-control" }) } </td> <td> @Html.DisplayFor(modelItem => item.username) </td> </tr> } </table>
item.status
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)