public string ImageSelect(string TableName, int id) { string result = ""; try { string ImageSelect = Data_dal.ImageSelect(TableName, id); string desc = Data_dal.GetDescription(TableName, id); if (!string.IsNullOrEmpty(ImageSelect)) { ImageSelect = "\"" + ImageSelect + "\""; TableName = "\"" + TableName + "\""; result = @"[{""image"":" + ImageSelect + ",\"TableName\":" + TableName + ",\"id\":" + id + ",\"desc\":'" + desc + "'}]"; } else { result = @"[{}]"; } } catch (Exception) { System.Web.HttpContext.Current.Response.Write("<script>alert(" + err + ")</script>"); } return(result); }