Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Copy method (String, String, Hashtable, Byte[])
Collapse the table of content
Expand the table of content

SPListItem.Copy method (String, String, Hashtable, Byte[])

Copies the specified item and its properties as a stream to the specified destination.

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

public static void Copy(
	string sourceUrl,
	string destinationUrl,
	Hashtable properties,
	byte[] stream
)

Parameters

sourceUrl
Type: System.String

The URL of the source location of the item to copy, which is used to set the CopySource field of the copied item.

destinationUrl
Type: System.String

The destination URL of the item.

NoteNote

The destination URL must reside on the same server on which the code is running. This copy operation does not copy to URLs on remote servers.

properties
Type: System.Collections.Hashtable

The metadata of the item.

stream
Type: []

The item as a binary stream.

ExceptionCondition
ArgumentException

sourceUrl or the destinationUrl is null or empty.

-or-

properties or stream is null .

This method copies the list item located at the sourceUrl and its properties specified by the properties parameter as a stream to the destination location specified by the destinationUrl parameter.

Show:
© 2015 Microsoft