Exemplo n.º 1
0
 public ActionResult Delete(string name, FormCollection collection)
 {
     try
     {
         // TODO: Add delete logic here
         _smbService.DeleteFile(name);
         return(RedirectToAction(nameof(Index)));
     }
     catch
     {
         return(View());
     }
 }
Exemplo n.º 2
0
 //[ValidateAntiForgeryToken]
 public ActionResult Delete(string name, IFormCollection collection)
 {
     try
     {
         // TODO: Add delete logic here
         _smbService.DeleteFile(name);
         return(RedirectToAction(nameof(Index)));
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
         return(View());
     }
 }