共用方式為


SPListItem.Copy method (String, String)

將指定的版本的項目複製到指定的目的地。

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Shared Sub Copy ( _
    sourceUrl As String, _
    destinationUrl As String _
)
'用途
Dim sourceUrl As String
Dim destinationUrl As StringSPListItem.Copy(sourceUrl, destinationUrl)
public static void Copy(
    string sourceUrl,
    string destinationUrl
)

參數

  • sourceUrl
    Type: System.String

    要複製之項目的來源 URL。

  • destinationUrl
    Type: System.String

    項目的 URL。

    注意事項注意事項

    目的地 URL 必須位於相同的伺服器執行的程式碼。此複製作業不會在遠端伺服器上複製的 url。

Exceptions

Exception Condition
ArgumentException

sourceUrl或destinationUrl是 null 或空白。

備註

此方法會複製到目的地位置destinationUrl參數所指定sourceUrl參數所指定的清單項目。

請參閱

參照

SPListItem class

SPListItem members

Copy overload

Microsoft.SharePoint namespace