SPFile.ReplaceLink method
新的連結來取代所有執行個體在檔案中指定的連結。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Sub ReplaceLink ( _
oldUrl As String, _
newUrl As String _
)
'用途
Dim instance As SPFile
Dim oldUrl As String
Dim newUrl As String
instance.ReplaceLink(oldUrl, newUrl)
public void ReplaceLink(
string oldUrl,
string newUrl
)
參數
oldUrl
Type: System.String要取代舊的絕對 URL。
newUrl
Type: System.String新的絕對 URL,以取代舊的 URL。
Exceptions
Exception | Condition |
---|---|
SPException | 更新連結時,就會發生錯誤。 |