Condividi tramite


SPList.GetDefaultViewForContentType Method

Returns the default view of list data that is used by the specified content type.

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

Syntax

'Declaration
Public Function GetDefaultViewForContentType ( _
    id As SPContentTypeId _
) As SPView
'Usage
Dim instance As SPList
Dim id As SPContentTypeId
Dim returnValue As SPView

returnValue = instance.GetDefaultViewForContentType(id)
public SPView GetDefaultViewForContentType(
    SPContentTypeId id
)

Parameters

Return Value

Type: Microsoft.SharePoint.SPView
The view.

Remarks

This method gets the default view from the Views property.

See Also

Reference

SPList Class

SPList Members

Microsoft.SharePoint Namespace