public override string GetPageUrl(int pageIndex) { var query = base.GetPageUrl(pageIndex); foreach (var type in Type) { query += "&type=" + System.Net.WebUtility.UrlEncode(type); } foreach (var status in Status) { query += "&status=" + System.Net.WebUtility.UrlEncode(status); } query += PlanningType.IsSet() ? "&planning=" + System.Net.WebUtility.UrlEncode(PlanningType) : ""; query += LoadImages ? "&img=true" : ""; query += Featured ? "&featured=true" : ""; query += Location.IsSet() ? "&location=" + System.Net.WebUtility.UrlEncode(Location) : ""; query += Agent.IsSet() ? "&agent=" + System.Net.WebUtility.UrlEncode(Agent) : ""; query += PlanningType.IsSet() ? "&planning=" + System.Net.WebUtility.UrlEncode(PlanningType) : ""; query += Bedrooms.HasValue ? "&beds=" + Bedrooms : ""; query += MinBedrooms.HasValue ? "&beds-min=" + MinBedrooms : ""; query += MaxBedrooms.HasValue ? "&beds-max=" + MaxBedrooms : ""; query += MinPremium.HasValue ? "&prem-min=" + MinPremium : ""; query += MaxPremium.HasValue ? "&prem-max=" + MaxPremium : ""; query += MinPrice.HasValue ? "&price-min=" + MinPrice : ""; query += MaxPrice.HasValue ? "&price-max=" + MaxPrice : ""; query += MinRent.HasValue ? "&rent-min=" + MinRent : ""; query += MaxRent.HasValue ? "&rent-max=" + MaxRent : ""; query += PublishStatus.HasValue ? "&publish=" + PublishStatus : ""; return(query); }