public ActionResult DeleteFile(int ArticleID, string File) { try { FileModel fileModel = Flogic.GetCurrentFile(ArticleID, File); Flogic.DeleteFile(ArticleID, fileModel.File_ID); return(RedirectToAction("EditFile", "File")); } catch (SqlException sqlException) { return(View("Error", sqlException)); } catch (InvalidCastException invalidCastException) { return(View("Error", invalidCastException)); } }