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)

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