From afb8a2358845aa2135177e75dfcb9348446e4d78 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Mon, 5 Jun 2023 07:08:38 +0300 Subject: [PATCH] View thumbnail image on index page --- Pages/Shared/_Products.cshtml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Pages/Shared/_Products.cshtml b/Pages/Shared/_Products.cshtml index a82ac1c..eb38444 100644 --- a/Pages/Shared/_Products.cshtml +++ b/Pages/Shared/_Products.cshtml @@ -20,10 +20,11 @@ @{ var figure = product.Figures.First(); var filePath = $"/Content/{product.Id}/{figure.Id}.jpg"; + var thumbnailPath = $"/Content/{product.Id}/{figure.Id}_thumb.jpg"; } @product.Name + src="@thumbnailPath" alt="@product.Name" /> @for (int i = 1; i < product.Figures.Count(); i++) { filePath = $"/Content/{product.Id}/{product.Figures[i].Id}.jpg";