public CBPaging(CBQueryStringGenerator qsg, int totalPages, int totalResults, int itemsPerPage, string queryStringKey)
 {
     this.totalPages = totalPages;
     this.itemsPerPage = itemsPerPage;
     this.qsg = qsg;
     this.totalResults = totalResults;
     this.queryStringKey = queryStringKey;
 }
        public Dictionary<int, string> getPaging(HttpRequest req)
        {
            //Load the querystring keys
            CBQueryStringGenerator qsg = new CBQueryStringGenerator(req);

            //Create a dictionary to store the pages
            Dictionary<int, string> lsPaging = new Dictionary<int, string>();

            //Do a loop for the amount of pages you have
            for (int i = 1; i <= this.totalPages; i++)
            {
                //Add or overwrite the p querystring parameter
                qsg.add("p", i.ToString(), true);

                //Add the page number and url to the dictionary
                lsPaging.Add(i, qsg.getQueryString());
            }

            //Return the dictionary
            return lsPaging;
        }