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
)
參數
web
Type: Microsoft.SharePoint.SPWebSPWeb物件,代表包含該檔案的網站。
strFileName
Type: System.String檔案的名稱。
strProgId
Type: System.String程式識別碼 (ProgId) 的檔案。
redirect
Type: System.Int32SPTypeOfRedirect列舉值。
傳回值
Type: System.String
內含重新導向 URL 的字串。