public ActionResult Index(int page = 1, string keywords = "") { ViewBag.Keywords = keywords; var sortingPagingBuilder = new SortingPagingBuilder { Keywords = keywords, Sorts = new SortBuilder { ColumnName = "CreatedDate", ColumnOrder = SortBuilder.SortOrder.Descending } }; var paging = new Paging { PageNumber = page, PageSize = PageSize, TotalRecord = 0 }; var systemSettings = _systemSettingService.PagedList(sortingPagingBuilder, paging); if (systemSettings != null && systemSettings.Any()) { var pageInfo = new Helper.PageInfo(CommonHelper.PageSize, page, paging.TotalRecord, i => Url.Action("Index", new { page = i, keywords })); ViewBag.PageInfo = pageInfo; } return(View(systemSettings)); }