Fork me on GitHub

HtmlHelper class

Returns an HTML container element with data attributes that contains a list of hyperlinks and text for providing paging functionality to the giver data.
Constructor:
NameDescription
HtmlPager(HtmlHelper html, int totalItemCount, int pageSize, int pageIndex,PagerOptions pagerOptions) Initializes a new instance of HtmlPager class with the specified HtmlHelper instance, total item count, page size, current page index and the PagerOptions instance.
HtmlPager(HtmlHelper html, int totalItemCount, int pageSize, int pageIndex) Initializes a new instance of HtmlPager class with the specified HtmlHelper instance, total item count, page size and current page index.
HtmlPager(HtmlHelper html, IPagedList pagedList,PagerOptions pagerOptions) Initializes a new instance of HtmlPager class with the specified HtmlHelper instance, data object that implements the IPagedList interface and the PagerOptions instance.
HtmlPager(HtmlHelper html, IPagedList pagedList) Initializes a new instance of HtmlPager class with the specified HtmlHelper instance and data object that implements the IPagedList interface.
Public methods:
NameDescriptionReturn value
Options(Action<PagerOptionsBuilder> builder) Method used to create the PagerOptions object. HtmlPager
ToHtmlString() Renders HtmlPager to HTML encoded string for display on the page. string