Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ContentTypes Property
Collapse the table of content
Expand the table of content

SPWeb.ContentTypes Property

Windows SharePoint Services 3

Gets the collection of content types for the Web site.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

'Declaration
Public ReadOnly Property ContentTypes As SPContentTypeCollection
	Get
'Usage
Dim instance As SPWeb
Dim value As SPContentTypeCollection

value = instance.ContentTypes

Property Value

Type: Microsoft.SharePoint.SPContentTypeCollection
An SPContentTypeCollection object that represents the content types.

The ContentTypes property returns only the content types that exist on the current Web site, not all content types in the current scope. Use the AvailableContentTypes property to return all content types in the current scope, including those of any parent Web sites.

When you add a content type to this collection, you make it available to lists in the current Web site and in any child Web sites.

Community Additions

ADD
Show:
© 2015 Microsoft