SPUtility.MapToIcon method (SPWeb, String, String)

Returns the name of the image file for the icon that is used to represent the specified file.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Shared Function MapToIcon ( _
    web As SPWeb, _
    strFileName As String, _
    strProgID As String _
) As String
'Usage
Dim web As SPWeb
Dim strFileName As String
Dim strProgID As String
Dim returnValue As String

returnValue = SPUtility.MapToIcon(web, _
    strFileName, strProgID)
public static string MapToIcon(
    SPWeb web,
    string strFileName,
    string strProgID
)

Parameters

  • strFileName
    Type: System.String

    A string that contains the file name.

  • strProgID
    Type: System.String

    A string that contains the program ID (ProgID) of the application that was used to create the file.

Return value

Type: System.String
A string that contains the name of the image file for the icon.

See also

Reference

SPUtility class

SPUtility members

MapToIcon overload

Microsoft.SharePoint.Utilities namespace