HttpEncoder.UrlPathEncode Method (String)
Encodes a subsection of a URL.
Assembly: System.Web (in System.Web.dll)
Applies the encoding logic of themethod 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.
Available since 4.0