SPUtility.GetUrlFileName method

Returns the filename part of the URL.

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

Syntax

'Declaration
Public Shared Function GetUrlFileName ( _
    url As String _
) As String
'Usage
Dim url As String
Dim returnValue As String

returnValue = SPUtility.GetUrlFileName(url)
public static string GetUrlFileName(
    string url
)

Parameters

Return value

Type: System.String
A string that contains the filename part of the URL.

Remarks

If the url parameter is https://server/web/list/folder/file.txt, the returned filename part is "file.txt".

See also

Reference

SPUtility class

SPUtility members

Microsoft.SharePoint.Utilities namespace