共用方式為


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
)

參數

  • newUrl
    Type: System.String

    新的絕對 URL,以取代舊的 URL。

Exceptions

Exception Condition
SPException

更新連結時,就會發生錯誤。

請參閱

參照

SPFile class

SPFile members

Microsoft.SharePoint namespace