SPHttpUtility.UrlEncodeFilenameForHttpHeader Method
Encodes a file name for use in an HTTP header.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Shared Function UrlEncodeFilenameForHttpHeader ( _
fileName As String _
) As String
'Usage
Dim fileName As String
Dim returnValue As String
returnValue = SPHttpUtility.UrlEncodeFilenameForHttpHeader(fileName)
public static string UrlEncodeFilenameForHttpHeader(
string fileName
)
Parameters
fileName
Type: System.StringThe file name to be encoded.
Return Value
Type: System.String
Returns the encoded file name.