7.6.3 Creating a Partial View; Listing 7-29 Using a Partial View in the List.cshtml File
parent
bc939b22da
commit
5b843e3cdb
|
@ -7,15 +7,9 @@
|
||||||
|
|
||||||
@foreach (var p in Model.Products)
|
@foreach (var p in Model.Products)
|
||||||
{
|
{
|
||||||
<div class="well">
|
@Html.Partial("ProductSummary", p)
|
||||||
<h3>
|
|
||||||
<strong>@p.Name</strong>
|
|
||||||
<span class="pull-right label label-primary">@p.Price.ToString("c")</span>
|
|
||||||
</h3>
|
|
||||||
<span class="lead">@p.Description</span>
|
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div class="pager">
|
||||||
@Html.PageLinks(Model.PagingInfo, x => Url.Action("List", new { page = x}))
|
@Html.PageLinks(Model.PagingInfo, x => Url.Action("List", new { page = x}))
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue