7.6.3 Creating a Partial View; Listing 7-28. Adding Markup to the ProductSummary.cshtml File

This commit is contained in:
Jason Zhu 2021-09-08 16:17:32 +10:00
parent 982ff29ec1
commit bc939b22da
2 changed files with 10 additions and 0 deletions

View File

@ -147,6 +147,7 @@
<Content Include="Views\Shared\_Layout.cshtml" />
<Content Include="Views\Product\List.cshtml" />
<Content Include="Scripts\jquery-1.9.0.min.map" />
<Content Include="Views\Shared\ProductSummary.cshtml" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</None>

View File

@ -0,0 +1,9 @@
@model SportsStore.Domain.Entities.Product
<div class="well">
<h3>
<strong>@Model.Name</strong>
<span class="pull-right label label-primary">@Model.Price.ToString("c")</span>
</h3>
<span class="lead">@Model.Description</span>
</div>