myURLEncode

Does what Server.URLEncode does
In case you needed it, not sure when

Function myURLEncode(strString)
 Rett      = Replace(strString, "/", "%2F")
 Rett      = Replace(Rett, "|", "%7C")
 Rett      = Replace(Rett, "?", "%3F")
 Rett      = Replace(Rett, "!", "%21")
 Rett      = Replace(Rett, "@", "%40")
 Rett      = Replace(Rett, "\", "%5C")
 Rett      = Replace(Rett, "#", "%23")
 Rett      = Replace(Rett, "$", "%24")
 Rett      = Replace(Rett, "^", "%5E")
 Rett      = Replace(Rett, "&", "%26")
 Rett      = Replace(Rett, "%", "%25")
 Rett      = Replace(Rett, "*", "%2A")
 Rett      = Replace(Rett, "(", "%28")
 Rett      = Replace(Rett, ")", "%29")
 Rett      = Replace(Rett, "}", "%7D")
 Rett      = Replace(Rett, ":", "%3A")
 Rett      = Replace(Rett, ",", "%2C")
 Rett      = Replace(Rett, "{", "%7B")
 Rett      = Replace(Rett, "+", "%2B")
 Rett      = Replace(Rett, ".", "%2E")
 Rett      = Replace(Rett, "-", "%2D")
 Rett      = Replace(Rett, "~", "%7E")
 Rett      = Replace(Rett, "-", "%2D")
 Rett      = Replace(Rett, "[", "%5B")
 Rett      = Replace(Rett, "_", "%5F")
 Rett      = Replace(Rett, "]", "%5D")
 Rett      = Replace(Rett, "`", "%60")
 Rett      = Replace(Rett, "=", "%3D")
 Rett      = Replace(Rett, "'", "%27")
 Rett      = Replace(Rett, Chr(34), "%22")
 myURLEncode    = Rett
End Function

strString

Views 304 Downloads 146

'encode', 'decode', 'URLEncode', 'Server', 'convert', 'replace', 'change', 'urldecode', 'string'

ANmarAmdeen
326
Texts + Strings Classic ASP
Revisions

v1.0