共用方式為


Lists.ApplyContentTypeToList method

將指定的網站內容類型] 清單中,以新增為清單內容類型。

Namespace:  WebSvcLists
Assembly:  STSSOAP (in STSSOAP.dll)

Syntax

'宣告
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/ApplyContentTypeToList", RequestNamespace := "https://schemas.microsoft.com/sharepoint/soap/",  _
    ResponseNamespace := "https://schemas.microsoft.com/sharepoint/soap/",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function ApplyContentTypeToList ( _
    webUrl As String, _
    contentTypeId As String, _
    listName As String _
) As XmlNode
'用途
Dim instance As Lists
Dim webUrl As String
Dim contentTypeId As String
Dim listName As String
Dim returnValue As XmlNode

returnValue = instance.ApplyContentTypeToList(webUrl, _
    contentTypeId, listName)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/ApplyContentTypeToList", RequestNamespace = "https://schemas.microsoft.com/sharepoint/soap/", 
    ResponseNamespace = "https://schemas.microsoft.com/sharepoint/soap/", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public XmlNode ApplyContentTypeToList(
    string webUrl,
    string contentTypeId,
    string listName
)

參數

  • contentTypeId
    Type: System.String

    新增至 [為清單內容類型] 清單的網站內容類型的內容類型識別碼。

傳回值

Type: System.Xml.XmlNode
一個字串,以下列格式,指出在方法成功。

<Success xmlns="https://schemas.microsoft.com/sharepoint/soap/"/>

請參閱

參照

Lists class

Lists members

WebSvcLists namespace

其他資源

Content Types

Content Type IDs

Site and List Content Types