Compartilhar via


SPWeb.ListTemplates Property

Gets the collection of all list definitions and list templates that are available for creating lists on the website.

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

Syntax

'Declaration
<ClientCallableAttribute> _
Public ReadOnly Property ListTemplates As SPListTemplateCollection
    Get
'Usage
Dim instance As SPWeb
Dim value As SPListTemplateCollection

value = instance.ListTemplates
[ClientCallableAttribute]
public SPListTemplateCollection ListTemplates { get; }

Property Value

Type: Microsoft.SharePoint.SPListTemplateCollection
An SPListTemplateCollection object that represents all the list definitions and list templates that are available for creating lists.

Remarks

Use the GetCustomListTemplates method of the SPSite class to return only the list templates that are created by users.

See Also

Reference

SPWeb Class

SPWeb Members

Microsoft.SharePoint Namespace