Advertisement
Iv555

Untitled

Feb 25th, 2023
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. @model MoiteRecepti.Web.ViewModels.Recipes.RecipesListViewModel
  2. @{
  3. this.ViewData["Title"] = "All Recipes, page " + Model.PageNumber;
  4. }
  5.  
  6. @if (this.TempData.ContainsKey("Message"))
  7. {
  8. <div class="alert alert-success">@this.TempData["Message"]</div>
  9. }
  10.  
  11. <h1>@this.ViewData["Title"]</h1>
  12. <hr />
  13. <div class="row">
  14. @foreach (var recipe in this.Model.Recipes)
  15. {
  16. <div class="media col-md-4">
  17. <img src="@recipe.ImageUrl" width="100" class="mr-3 img-responsive">
  18. <div class="media-body">
  19. <h5 class="mt-0"><a asp-action="ById" asp-route-id="@recipe.Id">@recipe.Name</a></h5>
  20. @recipe.CategoryName
  21. </div>
  22. </div>
  23. }
  24. </div>
  25. <hr />
  26. <partial name="_PagingPartial" model="@Model" />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement