Documentation > CMS Template API Library > PaginatedLinks > HasNext()
HasNext
Used to check if there are anymore links beyond the current page.
public System.Boolean HasNext()
Code Example
C#
Sample:
List<Asset> children = asset.GetFileList(); PaginateResult result = Util.Paginate(children, 5); if(result.PaginatedLinks.HasPrevious()) { Out.WriteLine("<a href=\"{0}\">< Previous</a> | ", result.PaginatedLinks.Previous); } int i = 0; foreach (PageLink link in result.PaginatedLinks) { if(!link.IsCurrent) { Out.WriteLine("<a href=\"{0}\">{1}</a> | ", link.ToString(), ++i); } else { Out.WriteLine("{0} | ", ++i); } } if(result.PaginatedLinks.HasNext()) { Out.WriteLine("<a href=\"{0}\">Next ></a> | ", result.PaginatedLinks.Next); }