ASP » Server » URLEncode

Syntax:
Server.URLEncode(String)
String
The String argument is the string to be encoded.

The URLEncode method applies URL rules to a specified string of ASCII characters.

The URLEncode method takes a string and converts it into a URL-encoded format. For example, you can use URLEncode to ensure that hyperlinks in your Active Server Pages are in the correct format.

There is one mandatory argument.

Examples

Code:
<% Response.Write Server.URLEncode("http://www.issi.net") %>
Output:
http%3A%2F%2Fwww%2Eissi%2Enet

See Also: