Guest User

Untitled

a guest
Jun 17th, 2019
77
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. css
  2.  
  3. body {
  4. }
  5.  
  6. .img-with-text {
  7. text-align: justify;
  8. width: 150px;
  9. }
  10.  
  11. .img-with-text img {
  12. display: block;
  13. margin: 0 auto;
  14. }
  15.  
  16.  
  17. html
  18.  
  19. <link rel="stylesheet" href="~/css/starter.css" />
  20. @foreach (var item in Model.Category)
  21. {
  22.  
  23.  
  24. <text>
  25. @* @("~/img/"+item.CategoryName+".jpg") *@
  26. <a asp-page="/SubCategories/index" asp-route-id="@item.CategoryName">
  27. <img src="@("/img/"+item.CategoryName+".jpg")" class="profile" height="150" width="150" />
  28. </a> |
  29.  
  30. <a asp-page="/SubCategories/index" asp-route-id="@item.CategoryName">select</a>
  31.  
  32. @if (User.IsInRole("ProductAdministrators"))
  33. {
  34. <text>
  35. | <a asp-page="./Edit" asp-route-id="@item.CategoryID">Edit</a> |
  36.  
  37. <a asp-page="./Delete" asp-route-id="@item.CategoryID"> Delete </a>
  38. </text>
  39. }
  40. </text>
  41. }
RAW Paste Data