SPListCollection.Add method (String, String, String, String, Int32, String, String, SPFeatureDefinition, SPListTemplate.QuickLaunchOptions)
建立清單,根據指定的標題、 描述、 URL、 功能識別碼、 範本類型、 文件範本類型、 清單功能定義、 自訂功能的定義,並顯示連結到] 清單中快速啟動的選項。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
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
'用途
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
)
參數
title
Type: System.String字串,包含標題。
description
Type: System.String字串,包含描述。
url
Type: System.String字串,包含 URL。
featureId
Type: System.String字串,包含定義清單的功能的識別碼。
templateType
Type: System.Int32整數,指定清單定義的型別。
docTemplateType
Type: System.String字串,包含文件範本類型的整數 ID。這個值對應到指定的文件範本指定的站台範本的Onet.xml檔案中的Type屬性值。下列清單顯示的預設值可能的值:
100--無
101 — Microsoft Office Word 文件
102 — Microsoft Office SharePoint 設計工具 Web 網頁
103 — Microsoft Office Excel 試算表
104 — Microsoft Office PowerPoint 簡報
105 — 基本頁面
106 — 網頁組件頁面
130 — 資料連接
1000 — 空白表單
customSchemaXml
Type: System.String字串,包含定義自訂項目套用至] 功能定義的結構描述的 XML。
listInstanceFeatureDefintion
Type: Microsoft.SharePoint.Administration.SPFeatureDefinition物件,包含清單的基礎定義。
quickLaunchOptions
Type: Microsoft.SharePoint.SPListTemplate.QuickLaunchOptions列舉值,指定是否要顯示在 [快速啟動] 連結清單連結。
傳回值
Type: System.Guid
識別新清單的 GUID。