HttpUtility.UrlEncode(this.TextBox1.Text.ToString());
HttpUtility.UrlEncode 方法
.NET Framework (current version)
Encode the URL string. These method overloads can be used to encode the entire URL, including the value of the query string.
To encode or decode values outside the web application, use the WebUtility class.
Assembly: System.Web (in System.Web.dll)
name | illustrate | |
---|---|---|
UrlEncode(Byte[]) |
Convert a byte array to an encoded URL string. |
|
UrlEncode(Byte[], Int32, Int32) |
Converts an array of bytes to a URL-encoded string, starting at the specified position in the array, with the specified number of bytes. |
|
UrlEncode(String) |
Encode the URL string. |
|
UrlEncode(String, Encoding) |
Encodes the URL string using the specified encoding object. |