public void SetPageUrl(string currentUrlWithQueryString) { if (!currentUrlWithQueryString.Contains("?")) { PageUrl = currentUrlWithQueryString + "?p=" + Page; } else { if (rgx.Match(currentUrlWithQueryString).Success) { PageUrl = rgx.Replace(currentUrlWithQueryString, ("p=" + Page)); } else { PageUrl = currentUrlWithQueryString + ("&p=" + Page); } } if (NextPage >= 1) { NextPageUrl = rgx.Replace(PageUrl, ("p=" + NextPage.ToString())); } if (PrevPage >= 1) { PrevPageUrl = rgx.Replace(PageUrl, ("p=" + PrevPage.ToString())); } PageUrlTemplate = rgx.Replace(PageUrl, ("p={{page}}")); }
public override string ToString() { return("PageNumber: " + PageNumber.ToString() + "\n" + "PageSize: " + PageSize.ToString() + "\n" + "TotalPages: " + TotalPages.ToString() + "\n" + "TotalRecords: " + TotalRecords.ToString() + "\n" + "NextPage: " + NextPage.ToString() + "\n" + "PreviousPage: " + PreviousPage.ToString() + "\n" + "Data: " + Data + "\n" + "Succeeded: " + Succeeded.ToString() + "\n" + "Errors: " + Errors.ToString() + "\n"); }