SPListItem.CopyFrom Method (String)
Overwrites the current item with the specified version of the item.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Parameters
- sourceUrl
- Type: System.String
The URL of the specified version of the item to copy and overwrite the current item.
NoteThe 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.
| Exception | Condition |
|---|---|
| ArgumentException |
sourceUrl is null or empty. |
| NotSupportedException |
The SPListItem object has an external data source. |
