This documentation is archived and is not being maintained.
HttpUtility.UrlPathEncode Method
.NET Framework 1.1
Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.
Encodes the path portion of a URL string for reliable HTTP transmission from the Web server to a client.
[Visual Basic] Public Shared Function UrlPathEncode( _ ByVal str As String _ ) As String [C#] public static string UrlPathEncode( string str ); [C++] public: static String* UrlPathEncode( String* str ); [JScript] public static function UrlPathEncode( str : String ) : String;
Parameters
- str
- The text to URL-encode.
Return Value
The URL-encoded text.
Remarks
URL encoding ensures that all browsers will correctly transmit text in URL strings. Characters such as ?, &,/, and spaces may be truncated or corrupted by some browsers so those characters must be encoded in <A> tags or in query strings where the strings may be re-sent by a browser in a request string.
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
See Also
HttpUtility Class | HttpUtility Members | System.Web Namespace
Show: