Export (0) Print
Expand All

SPListItem.CopyFrom method (String)

Overwrites the current item with the specified version of the item.

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

public void CopyFrom(
	string sourceUrl
)

Parameters

sourceUrl
Type: System.String

The URL of the specified version of the item to copy and overwrite the current item.

NoteNote

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

ExceptionCondition
ArgumentException

sourceUrl is null or empty.

NotSupportedException

The SPListItem object has an external data source.

The CopyFrom method resets the CopySource property on the destination item to the value of the sourceUrl parameter.

Show:
© 2014 Microsoft