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?

È stato utile?

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
scroll top