DirectoryNotFoundException durante il tentativo di leggere la libreria di immagini utilizzando LINQ
-
10-12-2019 - |
Domanda
Sto cercando di leggere una libreria di immagini denominata "Imamaelibrary" come segue:
SPList list = web.GetList("ImageLibrary");
.
Ma sto ottenendo un errore seguente:
.DirectoryNotFoundException
Come posso leggere ImageLibrary?
Soluzione
SPWeb.GetList("") gets a-a list by its server relative path. See here API description.
So to get your list try to pass something like "/Lists/ImageLibrary". Or appropriate server relative path.
Hope it helps,
Andrew
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange