Compartir a través de


FileCollection.AddTemplateFile Method

Adds a ghosted file to an existing list or document library.

Namespace:  Microsoft.SharePoint.Client
Assemblies:   Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

Syntax

'Declaration
<RemoteAttribute> _
Public Function AddTemplateFile ( _
    urlOfFile As String, _
    templateFileType As TemplateFileType _
) As File
'Usage
Dim instance As FileCollection
Dim urlOfFile As String
Dim templateFileType As TemplateFileType
Dim returnValue As File

returnValue = instance.AddTemplateFile(urlOfFile, _
    templateFileType)
[RemoteAttribute]
public File AddTemplateFile(
    string urlOfFile,
    TemplateFileType templateFileType
)

Parameters

  • urlOfFile
    Type: System.String

    The server relative URL of the file.

    It must not be null. It must not be empty.

Return Value

Type: Microsoft.SharePoint.Client.File
Returns File.

See Also

Reference

FileCollection Class

FileCollection Members

Microsoft.SharePoint.Client Namespace