![]() The UrlPathEncode method converts each space character into the string "%20", which represents a space in hexadecimal notation. The UrlEncode method converts each space character to a plus character (+). However, the methods return different results. You can encode a URL using with the UrlEncode method or the UrlPathEncode method. ![]() For example, when the characters are embedded in a block of text to be transmitted in a URL, they are encoded as %3c and %3e. URL encoding converts characters that are not allowed in a URL into character-entity equivalents URL decoding reverses the encoding. If characters such as blanks and punctuation are passed in an HTTP stream without encoding, they might be misinterpreted at the receiving end. ![]() The UrlEncode(String) method can be used to encode the entire URL, including query-string values.
0 Comments
Leave a Reply. |