Partilhar via


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

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

  • strProgId
    Type: System.String

    The program ID (ProgId) for the file.

Return Value

Type: System.String
A string that contains the redirection URL.

See Also

Reference

SPUtility Class

SPUtility Members

MapToServerFileRedirect Overload

Microsoft.SharePoint.Utilities Namespace