Επεξεργασία

Κοινή χρήση μέσω


HttpEncoder.UrlPathEncode(String) Method

Definition

Encodes a subsection of a URL.

protected public:
 virtual System::String ^ UrlPathEncode(System::String ^ value);
protected internal virtual string UrlPathEncode (string value);
abstract member UrlPathEncode : string -> string
override this.UrlPathEncode : string -> string
Protected Friend Overridable Function UrlPathEncode (value As String) As String

Parameters

value
String

The string to encode.

Returns

A URL-encoded string.

Remarks

The UrlPathEncode method is called by the UrlPathEncode method. The UrlPathEncode method performs the following steps:

  • Applies the encoding logic of the UrlPathEncode method to only the path part of the URL (which excludes the query string). The method assumes that the URL is encoded as a UTF-8 string.

  • Encodes non-spaces so that only a subset of the first 128 ASCII characters is used in the resulting encoded string. Any characters at Unicode value 128 and greater, or 32 and less, are URL-encoded.

  • Encodes spaces as %20.

Applies to