Share via


ContentType.DocumentTemplate property

Gets or sets a value that specifies the file path to the document template used for a new list item that has been assigned the content type.

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

Syntax

'Declaration
Public Property DocumentTemplate As String
    Get
    Set
'Usage
Dim instance As ContentType
Dim value As String

value = instance.DocumentTemplate

instance.DocumentTemplate = value
public string DocumentTemplate { get; set; }

Property value

Type: System.String
Returns a instance representing the file path to the document template used for a new list item that has been assigned the content type.

Exceptions

Exception Condition
SPException

It is not a valid file name or is it not a server-relative URL or it is not an absolute URL. Error code: -2146232832. List is not found or has been deleted. Error code: -2130575338.

Remarks

It must not be a null reference (Nothing in Visual Basic). It must be either an absolute URL, a server-relative URL, or a URL relative to the content type resource folder for the content type.

See also

Reference

ContentType class

ContentType members

Microsoft.SharePoint.Client namespace