public HttpResponseBase GetProductDetialText() { ProductQuery query = new ProductQuery(); string json = string.Empty; DataTable result = new DataTable(); string notFind = string.Empty; try { _productMgr = new ProductMgr(connectionString); if (!string.IsNullOrEmpty(Request.Params["product_IDS"])) { result = _productMgr.GetProductDetialText(query, Request.Params["product_IDS"], out notFind); if (result != null) { for (int i = 0; i < result.Rows.Count; i++) { result.Rows[i][0] = result.Rows[i][0].ToString().Replace("<br/>", "\n"); } json = "{success:true,data:" + JsonConvert.SerializeObject(result, Newtonsoft.Json.Formatting.Indented) + "}"; } else { json = "{success:false,data:" + JsonConvert.SerializeObject(notFind, Newtonsoft.Json.Formatting.Indented) + "}"; } } } catch (Exception ex) { Log4NetCustom.LogMessage logMessage = new Log4NetCustom.LogMessage(); logMessage.Content = string.Format("TargetSite:{0},Source:{1},Message:{2}", ex.TargetSite.Name, ex.Source, ex.Message); logMessage.MethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; log.Error(logMessage); json = "{success:false,data:[]}"; } this.Response.Clear(); this.Response.Write(json); this.Response.End(); return this.Response; }