FormTemplateCollection.RegisterFormTemplate Method (String, SPFeatureDefinition, Boolean)
Registers a form template on the server farm.
Namespace: Microsoft.Office.InfoPath.Server.Administration
Assembly: Microsoft.Office.InfoPath.Server (in Microsoft.Office.InfoPath.Server.dll)
Syntax
'Declaration
Public Shared Sub RegisterFormTemplate ( _
fileFullName As String, _
featureDefinition As SPFeatureDefinition, _
createFormContentTypeTemplate As Boolean _
)
'Usage
Dim fileFullName As String
Dim featureDefinition As SPFeatureDefinition
Dim createFormContentTypeTemplate As Boolean
FormTemplateCollection.RegisterFormTemplate(fileFullName, _
featureDefinition, createFormContentTypeTemplate)
public static void RegisterFormTemplate(
string fileFullName,
SPFeatureDefinition featureDefinition,
bool createFormContentTypeTemplate
)
Parameters
- fileFullName
Type: System.String
The full file name and path to the form template (.xsn) file to register.
- featureDefinition
Type: Microsoft.SharePoint.Administration.SPFeatureDefinition
The location and name of the SharePoint feature definition package.
- createFormContentTypeTemplate
Type: System.Boolean
Indicates whether a SharePoint content type is created when the form template is registered.
Remarks
Specifying a true value for the createFormContentTypeTemplate parameter is the same as using the UploadFormTemplate(String) method, although that method allows you to specify view state.