Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
Syntax
'Declaration
Public Sub ReplaceLink ( _
oldUrl As String, _
newUrl As String _
)
'Usage
Dim instance As SPFile
Dim oldUrl As String
Dim newUrl As String
instance.ReplaceLink(oldUrl, newUrl)
public void ReplaceLink(
string oldUrl,
string newUrl
)
Parameters
oldUrl
Type: System.StringThe old absolute URL to be replaced.
newUrl
Type: System.StringThe new absolute URL that replaces the old URL.
Exceptions
| Exception | Condition |
|---|---|
| SPException | An error occurred when updating the links. |