protected void ImgAttDelete_Click(object sender, CommandEventArgs e) { string[] cmdargs = e.CommandArgument.ToString().Split(','); string fileid = cmdargs[0].ToString(); string fileName = cmdargs[1].ToString(); string VesselName = UDFLib.ConvertStringToNull(Session["VesselName"]); //string filepath = "../uploads/CP/" + VesselName +"/"+ fileName; int retval = objCP.DEL_Attachments(UDFLib.ConvertIntegerToNull(Session["CPID"]), UDFLib.ConvertIntegerToNull(fileid), UDFLib.ConvertIntegerToNull(Session["userid"])); //if (File.Exists(Server.MapPath(filepath))) // File.Delete(Server.MapPath(filepath)); BindAttachment(); }