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)

public static string MapToServerFileRedirect(
	SPWeb web,
	string strFileName,
	string strProgId,
	int redirect
)

Parameters

web
Type: Microsoft.SharePoint.SPWeb

An SPWeb object that represents the site containing the file.

strFileName
Type: System.String

The name of the file.

strProgId
Type: System.String

The program ID (ProgId) for the file.

redirect
Type: System.Int32

The SPTypeOfRedirect enumeration value.

Return value

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