Lists.ApplyContentTypeToList 方法

为列表内容类型到列表中,添加指定的网站内容类型。

命名空间:  WebSvcLists
程序集:  STSSOAP(位于 STSSOAP.dll 中)

语法

声明
<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
    类型:System.String

    要添加与列表内容类型列表网站内容类型的内容类型 ID。

返回值

类型:System.Xml.XmlNode
一个字符串,采用以下格式,指示该方法成功。

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

另请参阅

引用

Lists 类

Lists 成员

WebSvcLists 命名空间

其他资源

Content Types

Content Type IDs

Site and List Content Types