public void imgbtnDelete_Click(object s, EventArgs e) { try { string[] arg = (((ImageButton)s).CommandArgument.Split(new char[] { ',' })); int res = BLL_POLOG_Register.POLOG_Delete_Attachments(arg[0].ToString(), arg[1].ToString(), Convert.ToInt16(GetSessionUserID())); BindReqsnAttchment(); ifrmDocPreview.Attributes["src"] = ""; } catch { } }
public void imgbtnDelete_Click(object s, EventArgs e) { try { string[] arg = (((ImageButton)s).CommandArgument.Split(new char[] { ',' })); int res = BLL_POLOG_Register.POLOG_Delete_Attachments(arg[0].ToString(), arg[1].ToString(), Convert.ToInt16(GetSessionUserID())); //string SavePath = Server.MapPath("\\" + System.Configuration.ConfigurationManager.AppSettings["APP_NAME"].ToString() + "\\Uploads\\Files_Uploaded"); //string SavePath = ("../Uploads/Files_Uploaded"); //string File_ID = arg[0]; //File_ID = File_ID.PadLeft(8, '0'); //string F1 = Mid(File_ID, 0, 2); //string F2 = Mid(File_ID, 2, 2); //string F3 = Mid(File_ID, 4, 2); //string filePath = SavePath + "\\" + F1 + "\\" + F2 + "\\" + F3 + "\\" + arg[2]; //if (File.Exists(filePath)) //{ // File.Delete(filePath); //} } catch { } }