HttpUtility.UrlDecode Method
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.
Converts a string that has been encoded for transmission in a URL into a decoded string.
To encode or decode values outside of a web application, use the WebUtility class.
UrlDecode(String, Encoding) |
Converts a URL-encoded string into a decoded string, using the specified encoding object. |
UrlDecode(Byte[], Int32, Int32, Encoding) |
Converts a URL-encoded byte array into a decoded string using the specified encoding object, starting at the specified position in the array, and continuing for the specified number of bytes. |
UrlDecode(String) |
Converts a string that has been encoded for transmission in a URL into a decoded string. |
UrlDecode(Byte[], Encoding) |
Converts a URL-encoded byte array into a decoded string using the specified decoding object. |
- Source:
- HttpUtility.cs
- Source:
- HttpUtility.cs
- Source:
- HttpUtility.cs
Converts a URL-encoded string into a decoded string, using the specified encoding object.
public:
static System::String ^ UrlDecode(System::String ^ str, System::Text::Encoding ^ e);
public static string? UrlDecode (string? str, System.Text.Encoding e);
public static string UrlDecode (string str, System.Text.Encoding e);
static member UrlDecode : string * System.Text.Encoding -> string
Public Shared Function UrlDecode (str As String, e As Encoding) As String
Parameters
- str
- String
The string to decode.
Returns
A decoded string.
Remarks
If characters such as blanks and punctuation are passed in an HTTP stream, they might be misinterpreted at the receiving end. URL encoding converts characters that are not allowed in a URL into character-entity equivalents; URL decoding reverses the encoding. For example, when embedded in a block of text to be transmitted in a URL, the characters < and > are encoded as %3c and %3e.
To encode or decode values outside of a web application, use the WebUtility class.
See also
Applies to
.NET 9 및 기타 버전
제품 | 버전 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
- Source:
- HttpUtility.cs
- Source:
- HttpUtility.cs
- Source:
- HttpUtility.cs
Converts a URL-encoded byte array into a decoded string using the specified encoding object, starting at the specified position in the array, and continuing for the specified number of bytes.
public:
static System::String ^ UrlDecode(cli::array <System::Byte> ^ bytes, int offset, int count, System::Text::Encoding ^ e);
public static string? UrlDecode (byte[]? bytes, int offset, int count, System.Text.Encoding e);
public static string UrlDecode (byte[] bytes, int offset, int count, System.Text.Encoding e);
static member UrlDecode : byte[] * int * int * System.Text.Encoding -> string
Public Shared Function UrlDecode (bytes As Byte(), offset As Integer, count As Integer, e As Encoding) As String
Parameters
- bytes
- Byte[]
The array of bytes to decode.
- offset
- Int32
The position in the byte to begin decoding.
- count
- Int32
The number of bytes to decode.
Returns
A decoded string.
Exceptions
bytes
is null
, but count
does not equal 0
.
offset
is less than 0
or greater than the length of the bytes
array.
-or-
count
is less than 0
, or count
+ offset
is greater than the length of the bytes
array.
Remarks
If characters such as blanks and punctuation are passed in an HTTP stream, they might be misinterpreted at the receiving end. URL encoding converts characters that are not allowed in a URL into character-entity equivalents; URL decoding reverses the encoding. For example, when embedded in a block of text to be transmitted in a URL the characters < and > are encoded as %3c and %3e.
To encode or decode values outside of a web application, use the WebUtility class.
See also
Applies to
.NET 9 및 기타 버전
제품 | 버전 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
- Source:
- HttpUtility.cs
- Source:
- HttpUtility.cs
- Source:
- HttpUtility.cs
Converts a string that has been encoded for transmission in a URL into a decoded string.
public:
static System::String ^ UrlDecode(System::String ^ str);
public static string? UrlDecode (string? str);
public static string UrlDecode (string str);
static member UrlDecode : string -> string
Public Shared Function UrlDecode (str As String) As String
Parameters
- str
- String
The string to decode.
Returns
A decoded string.
Remarks
If characters such as blanks and punctuation are passed in an HTTP stream, they might be misinterpreted at the receiving end. URL encoding converts characters that are not allowed in a URL into character-entity equivalents; URL decoding reverses the encoding. For example, when embedded in a block of text to be transmitted in a URL, the characters < and > are encoded as %3c and %3e.
To encode or decode values outside of a web application, use the WebUtility class.
See also
Applies to
.NET 9 및 기타 버전
제품 | 버전 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
- Source:
- HttpUtility.cs
- Source:
- HttpUtility.cs
- Source:
- HttpUtility.cs
Converts a URL-encoded byte array into a decoded string using the specified decoding object.
public:
static System::String ^ UrlDecode(cli::array <System::Byte> ^ bytes, System::Text::Encoding ^ e);
public static string? UrlDecode (byte[]? bytes, System.Text.Encoding e);
public static string UrlDecode (byte[] bytes, System.Text.Encoding e);
static member UrlDecode : byte[] * System.Text.Encoding -> string
Public Shared Function UrlDecode (bytes As Byte(), e As Encoding) As String
Parameters
- bytes
- Byte[]
The array of bytes to decode.
Returns
A decoded string.
Remarks
If characters such as blanks and punctuation are passed in an HTTP stream, they might be misinterpreted at the receiving end. URL encoding converts characters that are not allowed in a URL into character-entity equivalents; URL decoding reverses the encoding. For example, when embedded in a block of text to be transmitted in a URL, the characters < and > are encoded as %3c and %3e.
To encode or decode values outside of a web application, use the WebUtility class.
See also
Applies to
.NET 9 및 기타 버전
제품 | 버전 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET 피드백
.NET은(는) 오픈 소스 프로젝트입니다. 다음 링크를 선택하여 피드백을 제공해 주세요.