HttpServerUtilityWrapper.UrlEncode Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Encodes a string to include only characters that are valid in a URL.
Overloads
UrlEncode(String) |
URL-encodes a string and returns the encoded string. |
UrlEncode(String, TextWriter) |
URL-encodes a string and sends the resulting output to a stream. |
UrlEncode(String)
URL-encodes a string and returns the encoded string.
public:
override System::String ^ UrlEncode(System::String ^ s);
public override string UrlEncode (string s);
override this.UrlEncode : string -> string
Public Overrides Function UrlEncode (s As String) As String
Parameters
- s
- String
The text to URL-encode.
Returns
The URL-encoded text.
Applies to
UrlEncode(String, TextWriter)
URL-encodes a string and sends the resulting output to a stream.
public:
override void UrlEncode(System::String ^ s, System::IO::TextWriter ^ output);
public override void UrlEncode (string s, System.IO.TextWriter output);
override this.UrlEncode : string * System.IO.TextWriter -> unit
Public Overrides Sub UrlEncode (s As String, output As TextWriter)
Parameters
- s
- String
The string to encode.
- output
- TextWriter
The stream to contain the encoded string.
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈