Awesome Core and MVC Controls


It will generate a pager with buttons that will redirect to the specified url by adding the page parameter in the query string

Barley Grains

<table style="width: 300px;">
@{ foreach (var o in Model)
<br />

.Url(Url.Action("Index")) // url to go to
.Count((int)ViewData["count"]) // page count
.Page((int)ViewData["page"])) @*current page*@
public class PagerDemoController : Controller
public ActionResult Index(int page = 1)
const int PageSize = 1;
var pageCount = (Db.Meals.Count + PageSize - 1) / PageSize;

ViewData["page"] = page;
ViewData["count"] = pageCount;

return View(Db.Meals.Skip((page - 1) * PageSize).Take(PageSize));


We use cookies to improve your online experience. By accessing this site, you agree to the use of cookies and other technologies to process your personal data (e.g. IP address) to enhance and personalise your experience across our websites. Additionally, third-party companies, may store cookies on your device and use similar technologies to collect and use certain information. For more information, refer to our privacy policy and cookie policy.