Server.URLEncode
The URLEncode method applies URL encoding rules, including escape characters, to a specified string.
Syntax
Server.URLEncode(string**)**
Parameters
- string
Specifies the string to encode.
Example
The following script:
<%Response.Write(Server.URLEncode("https://www.microsoft.com")) %>
Produces the following output:
http%3A%2F%2Fwww%2Emicrosoft%2Ecom