From 1d1e1b3cc95c3d282db0ee08750976473142311f Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Fri, 20 Aug 2021 21:18:56 +1000 Subject: [PATCH] 7.3.3 Setting the Default Route; e.g. 7.8 The List.cshtml View --- .../SportsStore.WebUI/SportsStore.WebUI.csproj | 3 ++- .../SportsStore.WebUI/Views/Product/List.cshtml | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 SportsStore/SportsStore.WebUI/Views/Product/List.cshtml diff --git a/SportsStore/SportsStore.WebUI/SportsStore.WebUI.csproj b/SportsStore/SportsStore.WebUI/SportsStore.WebUI.csproj index 0784870..7c78d2f 100644 --- a/SportsStore/SportsStore.WebUI/SportsStore.WebUI.csproj +++ b/SportsStore/SportsStore.WebUI/SportsStore.WebUI.csproj @@ -136,7 +136,7 @@ - + Global.asax @@ -179,6 +179,7 @@ + diff --git a/SportsStore/SportsStore.WebUI/Views/Product/List.cshtml b/SportsStore/SportsStore.WebUI/Views/Product/List.cshtml new file mode 100644 index 0000000..07e44d2 --- /dev/null +++ b/SportsStore/SportsStore.WebUI/Views/Product/List.cshtml @@ -0,0 +1,14 @@ +@model IEnumerable + +@{ + ViewBag.Title = "Products"; +} + +@foreach (var p in Model) +{ +
+

@p.Name

+ @p.Description +

@p.Price.ToString("c")

+
+}