Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement