public void ProcessRequest(HttpContext context) { var PrefixText = context.Request.QueryString["term"]; var Country = context.Request.QueryString["country"]; var City = context.Request.QueryString["city"]; var Chain = context.Request.QueryString["chain"]; var Brand = context.Request.QueryString["brand"]; // var prefixText = context.Items["key"]; RQParams = new MDMSVC.DC_Accomodation_Search_RQ(); RQParams.ProductCategory = "Accommodation"; RQParams.ProductCategorySubType = "Hotel"; //txtProdCategoryt.Text; //RQParams.Status = ddlProductMappingStatus.SelectedItem.Text == "ACTIVE" ? true : false; //RQParams.Status = true; RQParams.Status = "ACTIVE"; if (PrefixText != "") { RQParams.HotelName = PrefixText; } if (!string.IsNullOrWhiteSpace(Country)) { if (Country.IndexOf("-") == -1) { RQParams.Country = Country; } } if (!string.IsNullOrWhiteSpace(City)) { if (City.IndexOf("-") == -1) { RQParams.City = City; } } if (!string.IsNullOrWhiteSpace(Chain)) { if (Chain.IndexOf("-") == -1) { RQParams.Chain = Chain; } } if (!string.IsNullOrWhiteSpace(Brand)) { if (Brand.IndexOf("-") == -1) { RQParams.Brand = Brand; } } RQParams.PageNo = PageIndex; RQParams.PageSize = 500; var res = AccSvc.GetAccomodationNames(RQParams); if (res != null) { if (res.Count == 0) { string msg = "No Hotel Found"; res.Add(msg); var a = res.Count(); context.Response.Write(new JavaScriptSerializer().Serialize(res)); } else { context.Response.Write(new JavaScriptSerializer().Serialize(res)); } } }