private void DeleteAttachment(HttpRequest Request, HttpResponse Response) { Response.Charset = "utf-8"; if (!string.IsNullOrWhiteSpace(Request.Params["ContentID"])) { int contentID = 0; if (!string.IsNullOrWhiteSpace(Request.Params["ContentID"])) { contentID = Globals.SafeInt(Request.Params["ContentID"], 0); } Maticsoft.BLL.CMS.Content content = new Maticsoft.BLL.CMS.Content(); Maticsoft.Model.CMS.Content model = content.GetModel(contentID); if (model != null) { model.Attachment = null; if (content.Update(model)) { Response.Write("SUCCESS"); } else { Response.Write("FAILED"); } } else { Response.Write("FAILED"); } } }