ReplaceLink Method

SPFile.ReplaceLink Method

Replaces all instances in the file of a specified link 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
)

Parameters

oldUrl
Type: System.String

The old absolute URL to be replaced.

newUrl
Type: System.String

The new absolute URL that replaces the old URL.

ExceptionCondition
SPException

An error occurred when updating the links.

Show:
© 2016 Microsoft