a guest Mar 18th, 2019 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public JsonResult Fotos()
  2.     {
  3.         DirectoryInfo dirInfo = new DirectoryInfo(Server.MapPath("~/Content/imagens/categoria"));
  4.         var lista = new List<string>();
  5.         foreach (var item in dirInfo.GetFiles())
  6.         {
  7.             lista.Add(item.FullName);
  8.         }
  9.         return Json(lista, JsonRequestBehavior.AllowGet);
  10.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand