Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Adds the specified site content type to a list, as a list content type.
Namespace: [Lists Web service]
Web service reference: http://Site/_vti_bin/Lists.asmx
Syntax
'Declaration
<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
'Usage
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
)
Parameters
webUrl
Type: System.StringThe URL of the site in which the list is located.
contentTypeId
Type: System.StringThe content type ID of the site content type to add to the list as a list content type.
listName
Type: System.StringThe name of the list.
Return Value
Type: System.Xml.XmlNode
A string, in the following format, indicating that the method succeeded.
<Success xmlns="https://schemas.microsoft.com/sharepoint/soap/"/>