Encodes a subsection of a URL.
Assembly: System.Web (in System.Web.dll)
Applies the encoding logic of the 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 127 and greater or less than 32 are URL-encoded. Spaces are not URL-encoded by this method, because ASP.NET encodes spaces as a separate operation in a helper class.
Encodes spaces as %20.