Guest User

Guest User

  • Tech Writer
  • 611
  • 130.3k

Get List in HTML

Dec 21 2020 11:26 AM
I have use this code Show UserData with ForEach Loop.It's possible or not Show data without foreach loop.
  1. @*@foreach (var item in Model.List_User)  
  2. {*@  
  3. <tr class="Search">  
  4. <td>@{ Srno++; } @Srno </td>  
  5. <td> @Html.DisplayFor(x => Model.UserName)</td>  
  6. <td>@Html.DisplayFor(x => Model.UserEmail)</td>  
  7. <td><a href="~/UserManagement/[email protected]" class="btn btn-primary">View Profile</a></td>  
  8. @*<td><button type="submit" class="btn btn-danger btndelete" id="@item.UserId"><i class="fa fa-trash" ></i> Suspend</button></td>*@  
  9. <td>  
  10. <span class="suspend-user btndelete pointer" id="@Model.UserId">  
  11. <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" data-toggle="tooltip" data-placement="top" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 459.739 459.739" style="enable-background:new 0 0 459.739 459.739;" xml:space="preserve">  
  12. <path d="M229.869,0C102.919,0,0,102.918,0,229.87s102.919,229.869,229.869,229.869c126.952,0,229.87-102.917,229.87-229.869 S356.821,0,229.869,0z M61.299,229.87c0-37.1,12.196-71.325,32.58-99.198L329.062,365.86 c-27.868,20.392-62.093,32.581-99.192,32.581C136.919,398.441,61.299,322.82,61.299,229.87z M369.138,324.683L135.048,90.601 c27.044-18.468,59.684-29.303,94.821-29.303c92.952,0,168.571,75.622,168.571,168.572 C398.44,265.009,387.607,297.649,369.138,324.683z" />  
  13. </svg>  
  14. </span>  
  15. </td>  
  16. </tr>  

Answers (1)