Question

J'essaie de lire une bibliothèque d'images nommée "ImageLibrary" comme suit:

SPList list = web.GetList("ImageLibrary");

Mais je reçois l'erreur suivante:

DirectoryNotFoundException

Comment puis-je lire Imagelibrary?

Était-ce utile?

La solution

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top