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.
Returns the redirection URL for the file or for its versions.
Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Shared Function MapToServerFileRedirect ( _
    web As SPWeb, _
    strFileName As String, _
    strProgId As String, _
    redirect As Integer _
) As String
'Usage
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
)
Parameters
web
Type: Microsoft.SharePoint.SPWebAn SPWeb object that represents the site containing the file.
strFileName
Type: System.StringThe name of the file.
strProgId
Type: System.StringThe program ID (ProgId) for the file.
redirect
Type: System.Int32The SPTypeOfRedirect enumeration value.
Return Value
Type: System.String
A string that contains the redirection URL.