try { FileInfo TheFile = new FileInfo(Server.MapPath(TextBox2.Text)); if (TheFile.Exists) { File.Delete(Server.MapPath(TextBox2.Text)); Response.Write("success"); } else { throw new FileNotFoundException(); } } catch (FileNotFoundException ex) { // lblStatus.Text += ex.Message; Response.Write(" "); Response.Write(ex.Message); } catch (Exception ex) { Response.Write(" "); Response.Write(ex.Message); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)