次の方法で共有


SPHttpUtility.UrlPathEncode method (String, Boolean, Boolean)

Encodes the specified path part of a URL for HTTP transmission.

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

Syntax

'Declaration
Public Shared Function UrlPathEncode ( _
    urlToEncode As String, _
    allowHashParameter As Boolean, _
    encodeUnicodeCharacters As Boolean _
) As String
'Usage
Dim urlToEncode As String
Dim allowHashParameter As Boolean
Dim encodeUnicodeCharacters As Boolean
Dim returnValue As String

returnValue = SPHttpUtility.UrlPathEncode(urlToEncode, _
    allowHashParameter, encodeUnicodeCharacters)
public static string UrlPathEncode(
    string urlToEncode,
    bool allowHashParameter,
    bool encodeUnicodeCharacters
)

Parameters

  • urlToEncode
    Type: System.String

    A string that contains the path.

  • allowHashParameter
    Type: System.Boolean

    true to specify that the decode operation can include a hash parameter; otherwise, false.

  • encodeUnicodeCharacters
    Type: System.Boolean

    true to encode Unicode characters; otherwise, false.

Return value

Type: System.String
A string that contains the encoded path.

See also

Reference

SPHttpUtility class

SPHttpUtility members

UrlPathEncode overload

Microsoft.SharePoint.Utilities namespace