HttpEncoder.UrlPathEncode Method (String)
.NET Framework (current version)
Encodes a subsection of a URL.
Assembly: System.Web (in System.Web.dll)
Parameters
- value
-
Type:
System.String
The string to encode.
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.
.NET Framework
Available since 4.0
Available since 4.0
Show: