SPListItem.ReplaceLink Method

Replaces all instances of a specified link in the list item with a new link.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

public void ReplaceLink(
	string oldUrl,
	string newUrl


Type: System.String

The absolute URL to be replaced.

Type: System.String

The absolute URL with which to replace the old URL.

This method immediately updates the item with the new link. There is no need to call the Update method after calling this method.