The URLEncode method applies URL encoding rules, including escape characters, to a specified string.
Server.URLEncode( string )
string
Specifies the string to encode.
The following script:
<%= Server.URLEncode("The paragraph tag: <P>") %>
produces the output:
The+paragraph+tag%3A+%3CP%3E