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.StringThe server relative URL of the file.
It must not be null. It must not be empty.
templateFileType
Type: Microsoft.SharePoint.Client.TemplateFileTypeSpecifies the template file type used for file creation.
The templateFileType must be of Standard or Wiki or Form type.
Return Value
Type: Microsoft.SharePoint.Client.File
Returns File.