public JsonResult member(string MyChecked) { Member n = new Member(); MemberData nd = new MemberData(); var array = MyChecked.Split(','); if (MyChecked != "" && MyChecked != null) { for (var i = 0; i < array.Length; i++) { //var Original = nd.Get().ToList().Where(a => a.num.ToString() == array[i]).SingleOrDefault(); //var DelPath = System.IO.Path.Combine(Server.MapPath("~/upload/News/"), Original.pic1); //System.IO.File.Delete(DelPath); //if (Original.jsonimg != "no_img.jpg") //{ // var jsonstr = JsonConvert.DeserializeObject<List<jsonSer>>(Original.jsonimg); // var DelJsonPath = Server.MapPath("~/upload/photograhy/"); // foreach (var j in jsonstr) // { // var DelJsonPathing = System.IO.Path.Combine(DelJsonPath, j.content); // System.IO.File.Delete(DelJsonPathing); // } //} //n.isdel = 1; //n.udate = DateTime.Now; n.num = Convert.ToInt32(array[i]); nd.Delete(n); } } return Json(""); }