共用方式為


SPList.GetContentTypeIdByUrl method

會傳回具有指定 URL 的內容類型的內容類型識別碼 (ID)。

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

Syntax

'宣告
Public Function GetContentTypeIdByUrl ( _
    url As String _
) As SPContentTypeId
'用途
Dim instance As SPList
Dim url As String
Dim returnValue As SPContentTypeId

returnValue = instance.GetContentTypeIdByUrl(url)
public SPContentTypeId GetContentTypeIdByUrl(
    string url
)

參數

傳回值

Type: Microsoft.SharePoint.SPContentTypeId
內容類型識別碼。

備註

如果url null 或空字串,此方法會傳回RootOfList()

請參閱

參照

SPList class

SPList members

Microsoft.SharePoint namespace