SPDocumentLibrary class
Represents a document library in Microsoft SharePoint Foundation.
Microsoft.SharePoint.SPSecurableObject
Microsoft.SharePoint.SPList
Microsoft.SharePoint.SPDocumentLibrary
Microsoft.SharePoint.SPPictureLibrary
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
The following code example iterates through all the sites and their lists and, excluding catalogs or form libraries, displays the name of the site and list, as well as the file name, for each item in every document library.
The example assumes the existence of an .aspx page that contains a label control.
This example requires using directives (Imports in Visual Basic) for the Microsoft.SharePoint and Microsoft.SharePoint.Utilities namespaces.
Note |
|---|
Certain objects implement the IDisposable interface, and you must avoid retaining these objects in memory after they are no longer needed. For information about good coding practices, see Disposing Objects. |
Note