Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Coding Cookbook/URL Encode

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Encode special characters in a string, so that it can be used in an URL VBScript solution function URLEncode (sInput) if IsNull(sInput) then URLEncode = "" exit function end if URLEncode = sInput URLEncode = Replace(URLEncode, chr(0), "") URLEncode = Replace(URLEncode, "%", "%25") URLEncode = Replace(URLEncode, " ", "%20") URLEncode = Replace(URLEncode, """", "%22") URLEncode = Replace(URLEncode, "&", "%26") URLEncode = Replace(URLEncode, "'", "%27") URLEncode = Replace(URLEncode, "/", "%2F") URLEncode = Replace(URLEncode, "?", "%3F") URLEncode = Replace(URLEncode, "\", "%5C") end function function URLEncode (sInput) Escape(sInput) end function URL Encode URL Encode