共用方式為


Lists.AddListFromFeature method

會根據指定的名稱、 描述、 功能識別碼和清單範本識別碼目前網站中建立清單

Namespace:  WebSvcLists
Assembly:  STSSOAP (in STSSOAP.dll)

Syntax

'宣告
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/AddListFromFeature", RequestNamespace := "https://schemas.microsoft.com/sharepoint/soap/",  _
    ResponseNamespace := "https://schemas.microsoft.com/sharepoint/soap/",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function AddListFromFeature ( _
    listName As String, _
    description As String, _
    featureID As Guid, _
    templateID As Integer _
) As XmlNode
'用途
Dim instance As Lists
Dim listName As String
Dim description As String
Dim featureID As Guid
Dim templateID As Integer
Dim returnValue As XmlNode

returnValue = instance.AddListFromFeature(listName, _
    description, featureID, templateID)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/AddListFromFeature", RequestNamespace = "https://schemas.microsoft.com/sharepoint/soap/", 
    ResponseNamespace = "https://schemas.microsoft.com/sharepoint/soap/", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public XmlNode AddListFromFeature(
    string listName,
    string description,
    Guid featureID,
    int templateID
)

參數

  • listName
    Type: System.String

    包含要新增的清單名稱字串。

  • featureID
    Type: System.Guid

    指定功能識別碼System.Guid

  • templateID
    Type: System.Int32

    32 位元整數,會指定要使用的清單範本。下表顯示可能的值的識別碼。

傳回值

Type: System.Xml.XmlNode
共同作業應用程式標記語言 (CAML)中包含新的清單與之相關資訊,下列格式片段可以指派給System.Xml.XmlNode物件。

<List DocTemplateUrl="" DefaultViewUrl="/Site_Name/Lists/List_Name/AllItems.aspx" 
   ID="{6A823AF7-F9BD-45CB-B94E-8D37B343FB82}" Title="MyNewList" 
   Description="This was made with the AddList method" ImageUrl="/_layouts/images/itgen.gif" 
   Name="{6A823AF7-F9BD-45CB-B94E-8D37B343FB82}" BaseType="0" ServerTemplate="100" 
   Created="20030619 07:11:30" Modified="20030619 07:11:30" LastDeleted="20030619 07:11:30" 
   Version="0" Direction="none" ThumbnailSize="0" WebImageWidth="0" WebImageHeight="0" 
   Flags="4096" ItemCount="0" AnonymousPermMask="0" RootFolder="Lists/MyNewList" ReadSecurity="1" 
   WriteSecurity="1" Author="1" EventSinkAssembly="" EventSinkClass="" EventSinkData="" 
   EmailInsertsFolder="" AllowDeletion="True" AllowMultiResponses="False" EnableAttachments="True" 
   EnableModeration="False" EnableVersioning="False" Hidden="False" MultipleDataList="False" 
   Ordered="False" ShowUser="True" xmlns="https://schemas.microsoft.com/sharepoint/soap/">
   <Fields>
      <Field ColName="tp_ID" ReadOnly="TRUE" Type="Counter" Name="ID" PrimaryKey="TRUE" 
         DisplayName="ID" FromBaseType="TRUE" />
      <Field Type="Text" Name="Title" DisplayName="Title" Required="TRUE" FromBaseType="TRUE" 
         ColName="nvarchar1" />
         ...
   <RegionalSettings>
      <Language>1033</Language>
      <Locale>1033</Locale>
      <AdvanceHijri>0</AdvanceHijri>
      <CalendarType>1</CalendarType>
      <Time24>False</Time24>
      <TimeZone>480</TimeZone>
      <SortOrder>2070</SortOrder>
      <Presence>True</Presence>
   </RegionalSettings>
</List>

請參閱

參照

Lists class

Lists members

WebSvcLists namespace