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
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.