共用方式為


SPUtility.MapToServerFileRedirect method (SPWeb, String, String, Int32)

會傳回檔案或其版本的重新導向 URL。

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Shared Function MapToServerFileRedirect ( _
    web As SPWeb, _
    strFileName As String, _
    strProgId As String, _
    redirect As Integer _
) As String
'用途
Dim web As SPWeb
Dim strFileName As String
Dim strProgId As String
Dim redirect As Integer
Dim returnValue As String

returnValue = SPUtility.MapToServerFileRedirect(web, _
    strFileName, strProgId, redirect)
public static string MapToServerFileRedirect(
    SPWeb web,
    string strFileName,
    string strProgId,
    int redirect
)

參數

  • strProgId
    Type: System.String

    程式識別碼 (ProgId) 的檔案。

傳回值

Type: System.String
內含重新導向 URL 的字串。

請參閱

參照

SPUtility class

SPUtility members

MapToServerFileRedirect overload

Microsoft.SharePoint.Utilities namespace