Export (0) Print
Expand All
Expand Minimize

SPUtility.GetUrlFileName Method

Returns the filename part of the URL.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

public static string GetUrlFileName(
	string url
)

Parameters

url
Type: System.String
The URL path.

Return Value

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

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

Community Additions

ADD
Show:
© 2014 Microsoft