Compartilhar via


SPSite.GetCatalog Method

Returns the list template gallery, site template gallery, Web Part gallery, master page gallery, or other galleries from the site collection, including custom galleries that are defined by users.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Function GetCatalog ( _
    typeCatalog As SPListTemplateType _
) As SPList
'Usage
Dim instance As SPSite
Dim typeCatalog As SPListTemplateType
Dim returnValue As SPList

returnValue = instance.GetCatalog(typeCatalog)
public SPList GetCatalog(
    SPListTemplateType typeCatalog
)

Parameters

Return Value

Type: Microsoft.SharePoint.SPList
An SPList object that represents the gallery.

Remarks

The GetCatalog method requires permission to the root Web site of the site collection, which is where the galleries are located.

See Also

Reference

SPSite Class

SPSite Members

Microsoft.SharePoint Namespace