@(Html.Awe().Pager() .Url(Url.Action("Index")) // url to go to .Count((int)ViewData["count"]) // page count .Page((int)ViewData["page"])) @*current page*@
Demos/Helpers/PagerDemoController.cs
using AweCoreDemo.Data; using Microsoft.AspNetCore.Mvc;
namespace AweCoreDemo.Controllers.Demos.Helpers { public class PagerDemoController : Controller { public IActionResult Index(int page = 1) { const int PageSize = 1; var pageCount = (Db.Meals.Count() + PageSize - 1) / PageSize;