Modifica

Condividi tramite


HttpServerUtilityWrapper.UrlEncode Method

Definition

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