-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a6fd662
commit 8819a79
Showing
7 changed files
with
84 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@using MvcPaging.Demo.Models | ||
@model IPagedList<MvcPaging.Demo.Models.Product> | ||
@{ | ||
ViewBag.Title = "Browse all products"; | ||
} | ||
<h2>@ViewBag.Title</h2> | ||
<table class="grid"> | ||
<thead> | ||
<tr> | ||
<th>Product name</th> | ||
<th>Category</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@foreach (var product in Model) | ||
{ | ||
<tr> | ||
<td>@product.Name</td> | ||
<td>@product.Category</td> | ||
</tr>} | ||
</tbody> | ||
</table> | ||
<div class="pager"> | ||
@Html.Pager(Model.PageSize, Model.PageNumber, Model.TotalItemCount).Options(o => o.CustomRouteName("generic")) | ||
</div> | ||
|
||
@{ | ||
var sourceModel = new ViewSourceViewModel(); | ||
sourceModel.RazorCode = @" | ||
"; | ||
sourceModel.ControllerCode = @" | ||
"; | ||
} | ||
|
||
@Html.Partial("ViewSource", sourceModel) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters