SPListCollection.Add Method (String, String, String, String, Int32, String, String, SPFeatureDefinition, SPListTemplate.QuickLaunchOptions)
Creates a list based on the specified title, description, URL, Feature ID, template type, document template type, the list feature definition, customizations to the feature definition, and options for displaying a link to the list in Quick Launch.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Overridable Function Add ( _
title As String, _
description As String, _
url As String, _
featureId As String, _
templateType As Integer, _
docTemplateType As String, _
customSchemaXml As String, _
listInstanceFeatureDefintion As SPFeatureDefinition, _
quickLaunchOptions As SPListTemplate.QuickLaunchOptions _
) As Guid
'Usage
Dim instance As SPListCollection
Dim title As String
Dim description As String
Dim url As String
Dim featureId As String
Dim templateType As Integer
Dim docTemplateType As String
Dim customSchemaXml As String
Dim listInstanceFeatureDefintion As SPFeatureDefinition
Dim quickLaunchOptions As SPListTemplate.QuickLaunchOptions
Dim returnValue As Guid
returnValue = instance.Add(title, description, _
url, featureId, templateType, docTemplateType, _
customSchemaXml, listInstanceFeatureDefintion, _
quickLaunchOptions)
public virtual Guid Add(
string title,
string description,
string url,
string featureId,
int templateType,
string docTemplateType,
string customSchemaXml,
SPFeatureDefinition listInstanceFeatureDefintion,
SPListTemplate.QuickLaunchOptions quickLaunchOptions
)
Parameters
title
Type: System.StringA string that contains the title.
description
Type: System.StringA string that contains the description.
url
Type: System.StringA string that contains the URL.
featureId
Type: System.StringA string that contains the ID of the Feature that defines the list.
templateType
Type: System.Int32An integer that specifies the type of list definition.
docTemplateType
Type: System.StringA string that contains the integer ID for the document template type. This value corresponds to the Type attribute value that is specified for a document template in the Understanding Onet.xml Files file of the specified site template. The following list shows the default possible values:
100 — None
101 — Microsoft Office Word document
102 — Microsoft Office SharePoint Designer Web page
103 — Microsoft Office Excel spreadsheet
104 — Microsoft Office PowerPoint presentation
105 — Basic page
106 — Web Part page
130 — Data connection
1000 — Blank form
customSchemaXml
Type: System.StringA string that contains XML that defines customizations to be applied to the schema for the feature definition.
listInstanceFeatureDefintion
Type: Microsoft.SharePoint.Administration.SPFeatureDefinitionAn object that contains the base definition for the list.
quickLaunchOptions
Type: Microsoft.SharePoint.SPListTemplate.QuickLaunchOptionsAn enumeration value that specifies whether to display a link to the list in the Quick Launch links.
Return Value
Type: System.Guid
A GUID that identifies the new list.