添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
有胆有识的鼠标垫  ·  PHP: ...·  2 天前    · 
瘦瘦的斑马  ·  戴铭的博客·  2 天前    · 
失落的勺子  ·  app | Electron 中文网·  2 天前    · 
风度翩翩的柿子  ·  Scope functions | ...·  昨天    · 
强健的猕猴桃  ·  NumberStyles 枚举 ...·  10 小时前    · 
失落的汽水  ·  CEF Forum • ...·  3 月前    · 
绅士的凉面  ·  Аксесуари в ...·  5 月前    · 
博学的仙人掌  ·  2D 边界碰撞体 (Edge ...·  10 月前    · 

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft Edge More info about Internet Explorer and Microsoft Edge
public:
 static System::String ^ UrlEncode(System::String ^ value);
public static string UrlEncode (string value);
public static string? UrlEncode (string? value);
static member UrlEncode : string -> string
Public Shared Function UrlEncode (value As String) As String

Parameters

Remarks

If characters such as blanks and punctuation are passed in an HTTP stream, they might be misinterpreted at the receiving end. URL encoding replaces characters that are not allowed in a URL with character-entity equivalents consisting of hexadecimal escape sequences. The converted string is expected to conform to the UTF-8 format.

URL encoding replaces all character codes except for letters, numbers, and the following punctuation characters:

  • - (minus sign)

  • _ (underscore)

  • . (period)

  • ! (exclamation point)

  • * (asterisk)

  • ( and ) (opening and closing parentheses)

    Each ' ' (space) character is converted to a + (plus) character.

    Replacing ' ' (space) with a '+' (plus) sign is expected only in query part of URI (by convention, not by standard) or in application/x-www-form-urlencoded HTTP content. Moreover, the above mentioned list of characters that are not replaced does not correspond neither to URL specification nor URI RFC 3986 . Use EscapeDataString for RFC compliant transformation.

    For example, when embedded in a block of text to be transmitted in a URL, the characters < and > are encoded as %3c and %3e .

    The UrlDecode method reverses the encoding.

  •