/// <summary> /// Compute url for given page index. /// </summary> /// <param name="pageIndex">The page index.</param> /// <returns>return the computed url for given page index.</returns> protected virtual string CreateUrlForPage(int pageIndex) { if (usePathInfo) { urlParts.PathInfoDict[pageParamName] = pageIndex.ToString(); } else { urlParts.QueryString.Remove(pageParamName); urlParts.QueryString[pageParamName] = pageIndex.ToString(); } return(urlParts.BuildPathForLink()); }