Permalink
Fetching contributors…
Cannot retrieve contributors at this time
1838 lines (1719 sloc) 113 KB
<Type Name="HttpUtility" FullName="System.Web.HttpUtility">
<TypeSignature Language="C#" Value="public sealed class HttpUtility" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit HttpUtility extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Web.HttpUtility" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class HttpUtility" />
<TypeSignature Language="C++ CLI" Value="public ref class HttpUtility sealed" />
<TypeSignature Language="F#" Value="type HttpUtility = class" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Provides methods for encoding and decoding URLs when processing Web requests. This class cannot be inherited.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.HttpUtility> class is used internally by the <xref:System.Web.HttpServerUtility> class, whose methods and properties are exposed through the intrinsic ASP.NET <xref:System.Web.HttpContext.Server%2A> object. Additionally, the <xref:System.Web.HttpUtility> class contains encoding and decoding utility methods that are not accessible from the <xref:System.Web.HttpContext.Server%2A>.
To encode or decode values outside of a web application, use the <xref:System.Net.WebUtility> class.
## Examples
The following code example demonstrates the use of the <xref:System.Web.HttpUtility.UrlEncode%2A>, <xref:System.Web.HttpUtility.UrlDecode%2A> and <xref:System.Web.HttpUtility.ParseQueryString%2A> methods of the <xref:System.Web.HttpUtility> class.
[!code-aspx-csharp[HttpUtilityExample#1](~/samples/snippets/csharp/VS_Snippets_WebNet/HttpUtilityExample/cs/httputilityexample.aspx#1)]
[!code-aspx-vb[HttpUtilityExample#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/HttpUtilityExample/vb/httputilityexample.aspx#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.HttpServerUtility" />
<altmember cref="P:System.Web.HttpContext.Server" />
<related type="Article" href="http://msdn.microsoft.com/library/6f67973f-dda0-45a1-ba9d-e88532d7dc5b">How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings</related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public HttpUtility ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; HttpUtility();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Web.HttpUtility" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.HttpUtility> class exposes methods for encoding and decoding string based URLs, URL tokens, and paths. The <xref:System.Web.HttpUtility> is used internally by the <xref:System.Web.HttpServerUtility> class.
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="HtmlAttributeEncode">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Minimally converts a string into an HTML-encoded string.</summary>
</Docs>
</MemberGroup>
<Member MemberName="HtmlAttributeEncode">
<MemberSignature Language="C#" Value="public static string HtmlAttributeEncode (string s);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string HtmlAttributeEncode(string s) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.HtmlAttributeEncode(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function HtmlAttributeEncode (s As String) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::String ^ HtmlAttributeEncode(System::String ^ s);" />
<MemberSignature Language="F#" Value="static member HtmlAttributeEncode : string -&gt; string" Usage="System.Web.HttpUtility.HtmlAttributeEncode s" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="s" Type="System.String" />
</Parameters>
<Docs>
<param name="s">The string to encode.</param>
<summary>Minimally converts a string to an HTML-encoded string.</summary>
<returns>An encoded string.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.HttpUtility.HtmlAttributeEncode%2A> method encodes characters appropriate for insertion into an HTML attribute value.
The string result from the <xref:System.Web.HttpUtility.HtmlAttributeEncode%2A> method should be used only for double-quoted attributes. Security issues might arise when using the <xref:System.Web.HttpUtility.HtmlAttributeEncode%2A> method with single-quoted attributes.
]]></format>
</remarks>
<related type="Article" href="http://msdn.microsoft.com/library/6f67973f-dda0-45a1-ba9d-e88532d7dc5b">How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings</related>
</Docs>
</Member>
<Member MemberName="HtmlAttributeEncode">
<MemberSignature Language="C#" Value="public static void HtmlAttributeEncode (string s, System.IO.TextWriter output);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void HtmlAttributeEncode(string s, class System.IO.TextWriter output) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.HtmlAttributeEncode(System.String,System.IO.TextWriter)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub HtmlAttributeEncode (s As String, output As TextWriter)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static void HtmlAttributeEncode(System::String ^ s, System::IO::TextWriter ^ output);" />
<MemberSignature Language="F#" Value="static member HtmlAttributeEncode : string * System.IO.TextWriter -&gt; unit" Usage="System.Web.HttpUtility.HtmlAttributeEncode (s, output)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="s" Type="System.String" />
<Parameter Name="output" Type="System.IO.TextWriter" />
</Parameters>
<Docs>
<param name="s">The string to encode</param>
<param name="output">A <see cref="T:System.IO.TextWriter" /> output stream.</param>
<summary>Minimally converts a string into an HTML-encoded string and sends the encoded string to a <see cref="T:System.IO.TextWriter" /> output stream.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.HttpUtility.HtmlAttributeEncode%2A> method converts only quotation marks ("), ampersands (&), and left angle brackets (<) to equivalent character entities. It is considerably faster than the <xref:System.Web.HttpUtility.HtmlEncode%2A> method.
The string result from the <xref:System.Web.HttpUtility.HtmlAttributeEncode%2A> method should be used only for double-quoted attributes. Security issues might arise when using the <xref:System.Web.HttpUtility.HtmlAttributeEncode%2A> method with single-quoted attributes.
]]></format>
</remarks>
<related type="Article" href="http://msdn.microsoft.com/library/6f67973f-dda0-45a1-ba9d-e88532d7dc5b">How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings</related>
</Docs>
</Member>
<MemberGroup MemberName="HtmlDecode">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Converts a string that has been HTML-encoded for HTTP transmission into a decoded string.
To encode or decode values outside of a web application, use the <see cref="T:System.Net.WebUtility" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName="HtmlDecode">
<MemberSignature Language="C#" Value="public static string HtmlDecode (string s);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string HtmlDecode(string s) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.HtmlDecode(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function HtmlDecode (s As String) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::String ^ HtmlDecode(System::String ^ s);" />
<MemberSignature Language="F#" Value="static member HtmlDecode : string -&gt; string" Usage="System.Web.HttpUtility.HtmlDecode s" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="s" Type="System.String" />
</Parameters>
<Docs>
<param name="s">The string to decode.</param>
<summary>Converts a string that has been HTML-encoded for HTTP transmission into a decoded string.</summary>
<returns>A decoded string.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If characters such as blanks and punctuation are passed in an HTTP stream, they might be misinterpreted at the receiving end. HTML encoding converts characters that are not allowed in HTML into character-entity equivalents; HTML decoding reverses the encoding. For example, when embedded in a block of text, the characters \< and > are encoded as `&lt;` and `&gt;` for HTTP transmission.
To encode or decode values outside of a web application, use the <xref:System.Net.WebUtility> class.
## Examples
The following code example demonstrates the <xref:System.Web.HttpUtility.HtmlEncode%2A> and <xref:System.Web.HttpUtility.HtmlDecode%2A> methods of the <xref:System.Web.HttpUtility> class. The input string is encoded using the <xref:System.Web.HttpUtility.HtmlEncode%2A> method. The encoded string obtained is then decoded using the <xref:System.Web.HttpUtility.HtmlDecode%2A> method.
[!code-csharp[HttpUtility_HtmlDecode#1](~/samples/snippets/csharp/VS_Snippets_WebNet/HttpUtility_HtmlDecode/CS/httputility_htmldecode.cs#1)]
[!code-vb[HttpUtility_HtmlDecode#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/HttpUtility_HtmlDecode/VB/httputility_htmldecode.vb#1)]
]]></format>
</remarks>
<altmember cref="M:System.Web.HttpUtility.HtmlEncode(System.String)" />
</Docs>
</Member>
<Member MemberName="HtmlDecode">
<MemberSignature Language="C#" Value="public static void HtmlDecode (string s, System.IO.TextWriter output);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void HtmlDecode(string s, class System.IO.TextWriter output) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.HtmlDecode(System.String,System.IO.TextWriter)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub HtmlDecode (s As String, output As TextWriter)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static void HtmlDecode(System::String ^ s, System::IO::TextWriter ^ output);" />
<MemberSignature Language="F#" Value="static member HtmlDecode : string * System.IO.TextWriter -&gt; unit" Usage="System.Web.HttpUtility.HtmlDecode (s, output)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="s" Type="System.String" />
<Parameter Name="output" Type="System.IO.TextWriter" />
</Parameters>
<Docs>
<param name="s">The string to decode.</param>
<param name="output">A <see cref="T:System.IO.TextWriter" /> stream of output.</param>
<summary>Converts a string that has been HTML-encoded into a decoded string, and sends the decoded string to a <see cref="T:System.IO.TextWriter" /> output stream.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If characters such as blanks and punctuation are passed in an HTTP stream, they might be misinterpreted at the receiving end. HTML encoding converts characters that are not allowed in HTML into character-entity equivalents; HTML decoding reverses the encoding. For example, when embedded in a block of text, the characters \< and > are encoded as `&lt;` and `&gt;` for HTTP transmission.
To encode or decode values outside of a web application, use the <xref:System.Net.WebUtility> class.
]]></format>
</remarks>
<altmember cref="M:System.Web.HttpUtility.HtmlEncode(System.String,System.IO.TextWriter)" />
</Docs>
</Member>
<MemberGroup MemberName="HtmlEncode">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Converts a string into an HTML-encoded string.
To encode or decode values outside of a web application, use the <see cref="T:System.Net.WebUtility" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName="HtmlEncode">
<MemberSignature Language="C#" Value="public static string HtmlEncode (object value);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string HtmlEncode(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.HtmlEncode(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function HtmlEncode (value As Object) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::String ^ HtmlEncode(System::Object ^ value);" />
<MemberSignature Language="F#" Value="static member HtmlEncode : obj -&gt; string" Usage="System.Web.HttpUtility.HtmlEncode value" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">An object.</param>
<summary>Converts an object's string representation into an HTML-encoded string, and returns the encoded string.</summary>
<returns>An encoded string.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
To encode or decode values outside of a web application, use the <xref:System.Net.WebUtility> class.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="HtmlEncode">
<MemberSignature Language="C#" Value="public static string HtmlEncode (string s);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string HtmlEncode(string s) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.HtmlEncode(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function HtmlEncode (s As String) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::String ^ HtmlEncode(System::String ^ s);" />
<MemberSignature Language="F#" Value="static member HtmlEncode : string -&gt; string" Usage="System.Web.HttpUtility.HtmlEncode s" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="s" Type="System.String" />
</Parameters>
<Docs>
<param name="s">The string to encode.</param>
<summary>Converts a string to an HTML-encoded string.</summary>
<returns>An encoded string.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If characters such as blanks and punctuation are passed in an HTTP stream, they might be misinterpreted at the receiving end. HTML encoding converts characters that are not allowed in HTML into character-entity equivalents; HTML decoding reverses the encoding. For example, when embedded in a block of text, the characters \< and > are encoded as `&lt;` and `&gt;` for HTTP transmission.
To encode or decode values outside of a web application, use the <xref:System.Net.WebUtility> class.
## Examples
The following code example demonstrates the <xref:System.Web.HttpUtility.HtmlEncode%2A> and <xref:System.Web.HttpUtility.HtmlDecode%2A> methods of the <xref:System.Web.HttpUtility> class. The input string is encoded using the <xref:System.Web.HttpUtility.HtmlEncode%2A> method. The encoded string obtained is then decoded using the <xref:System.Web.HttpUtility.HtmlDecode%2A> method.
[!code-csharp[HttpUtility_HtmlDecode#1](~/samples/snippets/csharp/VS_Snippets_WebNet/HttpUtility_HtmlDecode/CS/httputility_htmldecode.cs#1)]
[!code-vb[HttpUtility_HtmlDecode#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/HttpUtility_HtmlDecode/VB/httputility_htmldecode.vb#1)]
]]></format>
</remarks>
<altmember cref="M:System.Web.HttpUtility.HtmlDecode(System.String)" />
<related type="Article" href="http://msdn.microsoft.com/library/6f67973f-dda0-45a1-ba9d-e88532d7dc5b">How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings</related>
</Docs>
</Member>
<Member MemberName="HtmlEncode">
<MemberSignature Language="C#" Value="public static void HtmlEncode (string s, System.IO.TextWriter output);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void HtmlEncode(string s, class System.IO.TextWriter output) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.HtmlEncode(System.String,System.IO.TextWriter)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub HtmlEncode (s As String, output As TextWriter)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static void HtmlEncode(System::String ^ s, System::IO::TextWriter ^ output);" />
<MemberSignature Language="F#" Value="static member HtmlEncode : string * System.IO.TextWriter -&gt; unit" Usage="System.Web.HttpUtility.HtmlEncode (s, output)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="s" Type="System.String" />
<Parameter Name="output" Type="System.IO.TextWriter" />
</Parameters>
<Docs>
<param name="s">The string to encode</param>
<param name="output">A <see cref="T:System.IO.TextWriter" /> output stream.</param>
<summary>Converts a string into an HTML-encoded string, and returns the output as a <see cref="T:System.IO.TextWriter" /> stream of output.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If characters such as blanks and punctuation are passed in an HTTP stream, they might be misinterpreted at the receiving end. HTML encoding converts characters that are not allowed in HTML into character-entity equivalents; HTML decoding reverses the encoding. For example, when embedded in a block of text, the characters \< and >, are encoded as `&lt;` and `&gt;` for HTTP transmission.
To encode or decode values outside of a web application, use the <xref:System.Net.WebUtility> class.
]]></format>
</remarks>
<altmember cref="M:System.Web.HttpUtility.HtmlDecode(System.String,System.IO.TextWriter)" />
<related type="Article" href="http://msdn.microsoft.com/library/6f67973f-dda0-45a1-ba9d-e88532d7dc5b">How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings</related>
</Docs>
</Member>
<MemberGroup MemberName="JavaScriptStringEncode">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Encodes a string.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method encodes strings. For instance, single quotation marks and double quotation marks are included as `\'` and `\"` in the encoded string.
URL encoding makes sure that all browsers correctly transmit text in URL strings. Characters such as a question mark (?), ampersand (&), slash (/), and spaces might be truncated or corrupted by some browsers. Therefore, these characters must be encoded in `a` elements or in query strings where the strings can be re-sent by a browser in a request string.
]]></format>
</remarks>
</Docs>
</MemberGroup>
<Member MemberName="JavaScriptStringEncode">
<MemberSignature Language="C#" Value="public static string JavaScriptStringEncode (string value);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string JavaScriptStringEncode(string value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.JavaScriptStringEncode(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function JavaScriptStringEncode (value As String) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::String ^ JavaScriptStringEncode(System::String ^ value);" />
<MemberSignature Language="F#" Value="static member JavaScriptStringEncode : string -&gt; string" Usage="System.Web.HttpUtility.JavaScriptStringEncode value" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.String" />
</Parameters>
<Docs>
<param name="value">A string to encode.</param>
<summary>Encodes a string.</summary>
<returns>An encoded string.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="JavaScriptStringEncode">
<MemberSignature Language="C#" Value="public static string JavaScriptStringEncode (string value, bool addDoubleQuotes);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string JavaScriptStringEncode(string value, bool addDoubleQuotes) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.JavaScriptStringEncode(System.String,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function JavaScriptStringEncode (value As String, addDoubleQuotes As Boolean) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::String ^ JavaScriptStringEncode(System::String ^ value, bool addDoubleQuotes);" />
<MemberSignature Language="F#" Value="static member JavaScriptStringEncode : string * bool -&gt; string" Usage="System.Web.HttpUtility.JavaScriptStringEncode (value, addDoubleQuotes)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.String" />
<Parameter Name="addDoubleQuotes" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="value">A string to encode.</param>
<param name="addDoubleQuotes">A value that indicates whether double quotation marks will be included around the encoded string.</param>
<summary>Encodes a string.</summary>
<returns>An encoded string.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<MemberGroup MemberName="ParseQueryString">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Parses a query string into a <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
</Docs>
</MemberGroup>
<Member MemberName="ParseQueryString">
<MemberSignature Language="C#" Value="public static System.Collections.Specialized.NameValueCollection ParseQueryString (string query);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Specialized.NameValueCollection ParseQueryString(string query) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.ParseQueryString(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function ParseQueryString (query As String) As NameValueCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::Collections::Specialized::NameValueCollection ^ ParseQueryString(System::String ^ query);" />
<MemberSignature Language="F#" Value="static member ParseQueryString : string -&gt; System.Collections.Specialized.NameValueCollection" Usage="System.Web.HttpUtility.ParseQueryString query" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Specialized.NameValueCollection</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="query" Type="System.String" />
</Parameters>
<Docs>
<param name="query">The query string to parse.</param>
<summary>Parses a query string into a <see cref="T:System.Collections.Specialized.NameValueCollection" /> using <see cref="P:System.Text.Encoding.UTF8" /> encoding.</summary>
<returns>A <see cref="T:System.Collections.Specialized.NameValueCollection" /> of query parameters and values.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.HttpUtility.ParseQueryString%2A> method uses <xref:System.Text.Encoding.UTF8%2A> format to parse the query string In the returned <xref:System.Collections.Specialized.NameValueCollection>, URL-encoded characters are decoded and multiple occurrences of the same query string parameter are listed as a single entry with a comma separating each value.
> [!IMPORTANT]
> The <xref:System.Web.HttpUtility.ParseQueryString%2A> method uses query strings that might contain user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](http://msdn.microsoft.com/library/772c7312-211a-4eb3-8d6e-eec0aa1dcc07).
## Examples
The following code example demonstrates how to use the <xref:System.Web.HttpUtility.ParseQueryString%2A> method. Multiple occurrences of the same query string variable are consolidated in one entry of the returned <xref:System.Collections.Specialized.NameValueCollection>.
[!code-aspx-csharp[HttpUtility_ParseQueryString#1](~/samples/snippets/csharp/VS_Snippets_WebNet/HttpUtility_ParseQueryString/cs/httputility_parsequerystring.aspx#1)]
[!code-aspx-vb[HttpUtility_ParseQueryString#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/HttpUtility_ParseQueryString/vb/httputility_parsequerystring.aspx#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="query" /> is <see langword="null" />.</exception>
<altmember cref="T:System.Text.Encoding" />
</Docs>
</Member>
<Member MemberName="ParseQueryString">
<MemberSignature Language="C#" Value="public static System.Collections.Specialized.NameValueCollection ParseQueryString (string query, System.Text.Encoding encoding);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Specialized.NameValueCollection ParseQueryString(string query, class System.Text.Encoding encoding) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.ParseQueryString(System.String,System.Text.Encoding)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::Collections::Specialized::NameValueCollection ^ ParseQueryString(System::String ^ query, System::Text::Encoding ^ encoding);" />
<MemberSignature Language="F#" Value="static member ParseQueryString : string * System.Text.Encoding -&gt; System.Collections.Specialized.NameValueCollection" Usage="System.Web.HttpUtility.ParseQueryString (query, encoding)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Specialized.NameValueCollection</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="query" Type="System.String" />
<Parameter Name="encoding" Type="System.Text.Encoding" />
</Parameters>
<Docs>
<param name="query">The query string to parse.</param>
<param name="encoding">The <see cref="T:System.Text.Encoding" /> to use.</param>
<summary>Parses a query string into a <see cref="T:System.Collections.Specialized.NameValueCollection" /> using the specified <see cref="T:System.Text.Encoding" />.</summary>
<returns>A <see cref="T:System.Collections.Specialized.NameValueCollection" /> of query parameters and values.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
In the returned <xref:System.Collections.Specialized.NameValueCollection>, URL-encoded characters are decoded and multiple occurrences of the same query string parameter are listed as a single entry with a comma separating each value.
> [!IMPORTANT]
> The <xref:System.Web.HttpUtility.ParseQueryString%2A> method uses query strings that might contain user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](http://msdn.microsoft.com/library/772c7312-211a-4eb3-8d6e-eec0aa1dcc07).
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="query" /> is <see langword="null" />.
\- or -
<paramref name="encoding" /> is <see langword="null" />.</exception>
<altmember cref="T:System.Text.Encoding" />
</Docs>
</Member>
<MemberGroup MemberName="UrlDecode">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>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 <see cref="T:System.Net.WebUtility" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName="UrlDecode">
<MemberSignature Language="C#" Value="public static string UrlDecode (string str);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string UrlDecode(string str) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlDecode(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlDecode (str As String) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::String ^ UrlDecode(System::String ^ str);" />
<MemberSignature Language="F#" Value="static member UrlDecode : string -&gt; string" Usage="System.Web.HttpUtility.UrlDecode str" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="str" Type="System.String" />
</Parameters>
<Docs>
<param name="str">The string to decode.</param>
<summary>Converts a string that has been encoded for transmission in a URL into a decoded string.</summary>
<returns>A decoded string.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Net.WebUtility> class.
]]></format>
</remarks>
<altmember cref="M:System.Web.HttpUtility.UrlEncode(System.String)" />
</Docs>
</Member>
<Member MemberName="UrlDecode">
<MemberSignature Language="C#" Value="public static string UrlDecode (byte[] bytes, System.Text.Encoding e);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string UrlDecode(unsigned int8[] bytes, class System.Text.Encoding e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlDecode(System.Byte[],System.Text.Encoding)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlDecode (bytes As Byte(), e As Encoding) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::String ^ UrlDecode(cli::array &lt;System::Byte&gt; ^ bytes, System::Text::Encoding ^ e);" />
<MemberSignature Language="F#" Value="static member UrlDecode : byte[] * System.Text.Encoding -&gt; string" Usage="System.Web.HttpUtility.UrlDecode (bytes, e)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="bytes" Type="System.Byte[]" />
<Parameter Name="e" Type="System.Text.Encoding" />
</Parameters>
<Docs>
<param name="bytes">The array of bytes to decode.</param>
<param name="e">The <see cref="T:System.Text.Encoding" /> that specifies the decoding scheme.</param>
<summary>Converts a URL-encoded byte array into a decoded string using the specified decoding object.</summary>
<returns>A decoded string.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Net.WebUtility> class.
]]></format>
</remarks>
<altmember cref="M:System.Web.HttpUtility.UrlEncode(System.String)" />
</Docs>
</Member>
<Member MemberName="UrlDecode">
<MemberSignature Language="C#" Value="public static string UrlDecode (string str, System.Text.Encoding e);" FrameworkAlternate="netcore-2.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netstandard-2.0;netcore-2.1;netframework-4.7.2;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string UrlDecode(string str, class System.Text.Encoding e) cil managed" FrameworkAlternate="netcore-2.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netstandard-2.0;netcore-2.1;netframework-4.7.2;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlDecode(System.String,System.Text.Encoding)" FrameworkAlternate="netcore-2.1;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7.1;netstandard-2.0" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlDecode (str As String, e As Encoding) As String" FrameworkAlternate="netcore-2.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netstandard-2.0;netcore-2.1;netframework-4.7.2;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::String ^ UrlDecode(System::String ^ str, System::Text::Encoding ^ e);" FrameworkAlternate="netcore-2.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netstandard-2.0;netcore-2.1;netframework-4.7.2;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0" />
<MemberSignature Language="C#" Value="public static string UrlDecode (string s, System.Text.Encoding e);" FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string UrlDecode(string s, class System.Text.Encoding e) cil managed" FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlDecode(System.String,System.Text.Encoding)" FrameworkAlternate="netframework-4.7;netcore-2.0;netframework-4.7.2;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlDecode (s As String, e As Encoding) As String" FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::String ^ UrlDecode(System::String ^ s, System::Text::Encoding ^ e);" FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="F#" Value="static member UrlDecode : string * System.Text.Encoding -&gt; string" Usage="System.Web.HttpUtility.UrlDecode (s, e)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="str" Type="System.String" Index="0" FrameworkAlternate="netcore-2.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netstandard-2.0;netcore-2.1;netframework-4.7.2;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0" />
<Parameter Name="s" Type="System.String" Index="0" FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<Parameter Name="e" Type="System.Text.Encoding" Index="1" />
</Parameters>
<Docs>
<param name="str">The string to decode.</param>
<param name="s">The string to decode.</param>
<param name="e">The <see cref="T:System.Text.Encoding" /> that specifies the decoding scheme.</param>
<summary>Converts a URL-encoded string into a decoded string, using the specified encoding object.</summary>
<returns>A decoded string.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Net.WebUtility> class.
]]></format>
</remarks>
<altmember cref="M:System.Web.HttpUtility.UrlEncode(System.String)" />
</Docs>
</Member>
<Member MemberName="UrlDecode">
<MemberSignature Language="C#" Value="public static string UrlDecode (byte[] bytes, int offset, int count, System.Text.Encoding e);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string UrlDecode(unsigned int8[] bytes, int32 offset, int32 count, class System.Text.Encoding e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlDecode(System.Byte[],System.Int32,System.Int32,System.Text.Encoding)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlDecode (bytes As Byte(), offset As Integer, count As Integer, e As Encoding) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::String ^ UrlDecode(cli::array &lt;System::Byte&gt; ^ bytes, int offset, int count, System::Text::Encoding ^ e);" />
<MemberSignature Language="F#" Value="static member UrlDecode : byte[] * int * int * System.Text.Encoding -&gt; string" Usage="System.Web.HttpUtility.UrlDecode (bytes, offset, count, e)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="bytes" Type="System.Byte[]" />
<Parameter Name="offset" Type="System.Int32" />
<Parameter Name="count" Type="System.Int32" />
<Parameter Name="e" Type="System.Text.Encoding" />
</Parameters>
<Docs>
<param name="bytes">The array of bytes to decode.</param>
<param name="offset">The position in the byte to begin decoding.</param>
<param name="count">The number of bytes to decode.</param>
<param name="e">The <see cref="T:System.Text.Encoding" /> object that specifies the decoding scheme.</param>
<summary>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.</summary>
<returns>A decoded string.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Net.WebUtility> class.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="bytes" /> is <see langword="null" />, but <paramref name="count" /> does not equal <see langword="0" />.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="offset" /> is less than <see langword="0" /> or greater than the length of the <paramref name="bytes" /> array.
\- or -
<paramref name="count" /> is less than <see langword="0" />, or <paramref name="count" /> + <paramref name="offset" /> is greater than the length of the <paramref name="bytes" /> array.</exception>
<altmember cref="M:System.Web.HttpUtility.UrlEncode(System.String)" />
</Docs>
</Member>
<MemberGroup MemberName="UrlDecodeToBytes">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Converts a URL-encoded string or byte array into a decoded array of bytes.
To encode or decode values outside of a web application, use the <see cref="T:System.Net.WebUtility" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName="UrlDecodeToBytes">
<MemberSignature Language="C#" Value="public static byte[] UrlDecodeToBytes (byte[] bytes);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig unsigned int8[] UrlDecodeToBytes(unsigned int8[] bytes) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlDecodeToBytes(System.Byte[])" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlDecodeToBytes (bytes As Byte()) As Byte()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static cli::array &lt;System::Byte&gt; ^ UrlDecodeToBytes(cli::array &lt;System::Byte&gt; ^ bytes);" />
<MemberSignature Language="F#" Value="static member UrlDecodeToBytes : byte[] -&gt; byte[]" Usage="System.Web.HttpUtility.UrlDecodeToBytes bytes" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="bytes" Type="System.Byte[]" />
</Parameters>
<Docs>
<param name="bytes">The array of bytes to decode.</param>
<summary>Converts a URL-encoded array of bytes into a decoded array of bytes.</summary>
<returns>A decoded array of bytes.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Net.WebUtility> class.
]]></format>
</remarks>
<altmember cref="M:System.Web.HttpUtility.UrlEncodeToBytes(System.String)" />
</Docs>
</Member>
<Member MemberName="UrlDecodeToBytes">
<MemberSignature Language="C#" Value="public static byte[] UrlDecodeToBytes (string str);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig unsigned int8[] UrlDecodeToBytes(string str) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlDecodeToBytes(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlDecodeToBytes (str As String) As Byte()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static cli::array &lt;System::Byte&gt; ^ UrlDecodeToBytes(System::String ^ str);" />
<MemberSignature Language="F#" Value="static member UrlDecodeToBytes : string -&gt; byte[]" Usage="System.Web.HttpUtility.UrlDecodeToBytes str" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="str" Type="System.String" />
</Parameters>
<Docs>
<param name="str">The string to decode.</param>
<summary>Converts a URL-encoded string into a decoded array of bytes.</summary>
<returns>A decoded array of bytes.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Net.WebUtility> class.
]]></format>
</remarks>
<altmember cref="M:System.Web.HttpUtility.UrlEncodeToBytes(System.String)" />
</Docs>
</Member>
<Member MemberName="UrlDecodeToBytes">
<MemberSignature Language="C#" Value="public static byte[] UrlDecodeToBytes (string str, System.Text.Encoding e);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig unsigned int8[] UrlDecodeToBytes(string str, class System.Text.Encoding e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlDecodeToBytes(System.String,System.Text.Encoding)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlDecodeToBytes (str As String, e As Encoding) As Byte()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static cli::array &lt;System::Byte&gt; ^ UrlDecodeToBytes(System::String ^ str, System::Text::Encoding ^ e);" />
<MemberSignature Language="F#" Value="static member UrlDecodeToBytes : string * System.Text.Encoding -&gt; byte[]" Usage="System.Web.HttpUtility.UrlDecodeToBytes (str, e)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="str" Type="System.String" />
<Parameter Name="e" Type="System.Text.Encoding" />
</Parameters>
<Docs>
<param name="str">The string to decode.</param>
<param name="e">The <see cref="T:System.Text.Encoding" /> object that specifies the decoding scheme.</param>
<summary>Converts a URL-encoded string into a decoded array of bytes using the specified decoding object.</summary>
<returns>A decoded array of bytes.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Net.WebUtility> class.
]]></format>
</remarks>
<altmember cref="M:System.Web.HttpUtility.UrlEncodeToBytes(System.String)" />
</Docs>
</Member>
<Member MemberName="UrlDecodeToBytes">
<MemberSignature Language="C#" Value="public static byte[] UrlDecodeToBytes (byte[] bytes, int offset, int count);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig unsigned int8[] UrlDecodeToBytes(unsigned int8[] bytes, int32 offset, int32 count) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlDecodeToBytes(System.Byte[],System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlDecodeToBytes (bytes As Byte(), offset As Integer, count As Integer) As Byte()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static cli::array &lt;System::Byte&gt; ^ UrlDecodeToBytes(cli::array &lt;System::Byte&gt; ^ bytes, int offset, int count);" />
<MemberSignature Language="F#" Value="static member UrlDecodeToBytes : byte[] * int * int -&gt; byte[]" Usage="System.Web.HttpUtility.UrlDecodeToBytes (bytes, offset, count)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="bytes" Type="System.Byte[]" />
<Parameter Name="offset" Type="System.Int32" />
<Parameter Name="count" Type="System.Int32" />
</Parameters>
<Docs>
<param name="bytes">The array of bytes to decode.</param>
<param name="offset">The position in the byte array at which to begin decoding.</param>
<param name="count">The number of bytes to decode.</param>
<summary>Converts a URL-encoded array of bytes into a decoded array of bytes, starting at the specified position in the array and continuing for the specified number of bytes.</summary>
<returns>A decoded array of bytes.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Net.WebUtility> class.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="bytes" /> is <see langword="null" />, but <paramref name="count" /> does not equal <see langword="0" />.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="offset" /> is less than <see langword="0" /> or greater than the length of the <paramref name="bytes" /> array.
\- or -
<paramref name="count" /> is less than <see langword="0" />, or <paramref name="count" /> + <paramref name="offset" /> is greater than the length of the <paramref name="bytes" /> array.</exception>
<altmember cref="M:System.Web.HttpUtility.UrlEncodeToBytes(System.String)" />
</Docs>
</Member>
<MemberGroup MemberName="UrlEncode">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Encodes a URL string. These method overloads can be used to encode the entire URL, including query-string values.
To encode or decode values outside of a web application, use the <see cref="T:System.Net.WebUtility" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName="UrlEncode">
<MemberSignature Language="C#" Value="public static string UrlEncode (byte[] bytes);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string UrlEncode(unsigned int8[] bytes) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlEncode(System.Byte[])" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlEncode (bytes As Byte()) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::String ^ UrlEncode(cli::array &lt;System::Byte&gt; ^ bytes);" />
<MemberSignature Language="F#" Value="static member UrlEncode : byte[] -&gt; string" Usage="System.Web.HttpUtility.UrlEncode bytes" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="bytes" Type="System.Byte[]" />
</Parameters>
<Docs>
<param name="bytes">The array of bytes to encode.</param>
<summary>Converts a byte array into an encoded URL string.</summary>
<returns>An encoded string.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.HttpUtility.UrlEncode%2A> method can be used to encode the entire URL, including query-string values. 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 the characters \< and > are embedded in a block of text to be transmitted in a URL, they are encoded as %3c and %3e.
To encode or decode values outside of a web application, use the <xref:System.Net.WebUtility> class.
]]></format>
</remarks>
<altmember cref="M:System.Web.HttpUtility.UrlDecode(System.String)" />
<related type="Article" href="http://msdn.microsoft.com/library/6f67973f-dda0-45a1-ba9d-e88532d7dc5b">How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings</related>
</Docs>
</Member>
<Member MemberName="UrlEncode">
<MemberSignature Language="C#" Value="public static string UrlEncode (string str);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string UrlEncode(string str) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlEncode(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlEncode (str As String) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::String ^ UrlEncode(System::String ^ str);" />
<MemberSignature Language="F#" Value="static member UrlEncode : string -&gt; string" Usage="System.Web.HttpUtility.UrlEncode str" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="str" Type="System.String" />
</Parameters>
<Docs>
<param name="str">The text to encode.</param>
<summary>Encodes a URL string.</summary>
<returns>An encoded string.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.HttpUtility.UrlEncode%28System.String%29> method can be used to encode the entire URL, including query-string values. If characters such as blanks and punctuation are passed in an HTTP stream without encoding, 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 the characters \< and > are embedded in a block of text to be transmitted in a URL, they are encoded as %3c and %3e.
You can encode a URL using with the <xref:System.Web.HttpUtility.UrlEncode%2A> method or the <xref:System.Web.HttpUtility.UrlPathEncode%2A> method. However, the methods return different results. The <xref:System.Web.HttpUtility.UrlEncode%2A> method converts each space character to a plus character (+). The <xref:System.Web.HttpUtility.UrlPathEncode%2A> method converts each space character into the string "%20", which represents a space in hexadecimal notation. Use the <xref:System.Web.HttpUtility.UrlPathEncode%2A> method when you encode the path portion of a URL in order to guarantee a consistent decoded URL, regardless of which platform or browser performs the decoding.
The <xref:System.Web.HttpUtility.UrlEncode%2A?displayProperty=nameWithType> method uses UTF-8 encoding by default. Therefore, using the <xref:System.Web.HttpUtility.UrlEncode%2A> method provides the same results as using the <xref:System.Web.HttpUtility.UrlEncode%2A> method and specifying <xref:System.Text.Encoding.UTF8%2A> as the second parameter.
<xref:System.Web.HttpServerUtility.UrlEncode%2A> is a convenient way to access the <xref:System.Web.HttpUtility.UrlEncode%2A> method at run time from an ASP.NET application. Internally, <xref:System.Web.HttpServerUtility.UrlEncode%2A> uses the <xref:System.Web.HttpUtility.UrlEncode%2A> method to encode strings.
To encode or decode values outside of a web application, use the <xref:System.Net.WebUtility> class.
]]></format>
</remarks>
<altmember cref="M:System.Web.HttpUtility.UrlDecode(System.String)" />
<related type="Article" href="http://msdn.microsoft.com/library/6f67973f-dda0-45a1-ba9d-e88532d7dc5b">How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings</related>
</Docs>
</Member>
<Member MemberName="UrlEncode">
<MemberSignature Language="C#" Value="public static string UrlEncode (byte[] bytes, int offset, int count);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string UrlEncode(unsigned int8[] bytes, int32 offset, int32 count) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlEncode(System.Byte[],System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlEncode (bytes As Byte(), offset As Integer, count As Integer) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::String ^ UrlEncode(cli::array &lt;System::Byte&gt; ^ bytes, int offset, int count);" />
<MemberSignature Language="F#" Value="static member UrlEncode : byte[] * int * int -&gt; string" Usage="System.Web.HttpUtility.UrlEncode (bytes, offset, count)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="bytes" Type="System.Byte[]" />
<Parameter Name="offset" Type="System.Int32" />
<Parameter Name="count" Type="System.Int32" />
</Parameters>
<Docs>
<param name="bytes">The array of bytes to encode.</param>
<param name="offset">The position in the byte array at which to begin encoding.</param>
<param name="count">The number of bytes to encode.</param>
<summary>Converts a byte array into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes.</summary>
<returns>An encoded string.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.HttpUtility.UrlEncode%28System.String%29> method can be used to encode the entire URL, including query-string values. 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 the characters \< and > are embedded in a block of text to be transmitted in a URL, they are encoded as %3c and %3e.
To encode or decode values outside of a web application, use the <xref:System.Net.WebUtility> class.
]]></format>
</remarks>
<altmember cref="M:System.Web.HttpUtility.UrlDecode(System.String)" />
<related type="Article" href="http://msdn.microsoft.com/library/6f67973f-dda0-45a1-ba9d-e88532d7dc5b">How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings</related>
</Docs>
</Member>
<Member MemberName="UrlEncode">
<MemberSignature Language="C#" Value="public static string UrlEncode (string str, System.Text.Encoding e);" FrameworkAlternate="netcore-2.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netstandard-2.0;netcore-2.1;netframework-4.7.2;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string UrlEncode(string str, class System.Text.Encoding e) cil managed" FrameworkAlternate="netcore-2.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netstandard-2.0;netcore-2.1;netframework-4.7.2;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlEncode(System.String,System.Text.Encoding)" FrameworkAlternate="netcore-2.1;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7.1;netstandard-2.0" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlEncode (str As String, e As Encoding) As String" FrameworkAlternate="netcore-2.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netstandard-2.0;netcore-2.1;netframework-4.7.2;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::String ^ UrlEncode(System::String ^ str, System::Text::Encoding ^ e);" FrameworkAlternate="netcore-2.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netstandard-2.0;netcore-2.1;netframework-4.7.2;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0" />
<MemberSignature Language="C#" Value="public static string UrlEncode (string s, System.Text.Encoding Enc);" FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string UrlEncode(string s, class System.Text.Encoding Enc) cil managed" FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlEncode(System.String,System.Text.Encoding)" FrameworkAlternate="netframework-4.7;netcore-2.0;netframework-4.7.2;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlEncode (s As String, Enc As Encoding) As String" FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::String ^ UrlEncode(System::String ^ s, System::Text::Encoding ^ Enc);" FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="F#" Value="static member UrlEncode : string * System.Text.Encoding -&gt; string" Usage="System.Web.HttpUtility.UrlEncode (s, Enc)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="str" Type="System.String" Index="0" FrameworkAlternate="netcore-2.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netstandard-2.0;netcore-2.1;netframework-4.7.2;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0" />
<Parameter Name="s" Type="System.String" Index="0" FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<Parameter Name="e" Type="System.Text.Encoding" Index="1" FrameworkAlternate="netcore-2.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netstandard-2.0;netcore-2.1;netframework-4.7.2;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0" />
<Parameter Name="Enc" Type="System.Text.Encoding" Index="1" FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="str">The text to encode.</param>
<param name="s">The text to encode.</param>
<param name="e">The <see cref="T:System.Text.Encoding" /> object that specifies the encoding scheme.</param>
<param name="Enc">The <see cref="T:System.Text.Encoding" /> object that specifies the encoding scheme.</param>
<summary>Encodes a URL string using the specified encoding object.</summary>
<returns>An encoded string.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method can be used to encode the entire URL, including query-string values. 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 the characters \< and > are embedded in a block of text to be transmitted in a URL, they are encoded as %3c and %3e.
To encode or decode values outside of a web application, use the <xref:System.Net.WebUtility> class.
]]></format>
</remarks>
<altmember cref="M:System.Web.HttpUtility.UrlDecode(System.String)" />
<related type="Article" href="https://msdn.microsoft.com/library/6f67973f-dda0-45a1-ba9d-e88532d7dc5b">How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings</related>
<related type="Article" href="http://msdn.microsoft.com/library/6f67973f-dda0-45a1-ba9d-e88532d7dc5b">How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings</related>
</Docs>
</Member>
<MemberGroup MemberName="UrlEncodeToBytes">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Converts a string or a byte array into an encoded array of bytes.
To encode or decode values outside of a web application, use the <see cref="T:System.Net.WebUtility" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName="UrlEncodeToBytes">
<MemberSignature Language="C#" Value="public static byte[] UrlEncodeToBytes (byte[] bytes);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig unsigned int8[] UrlEncodeToBytes(unsigned int8[] bytes) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlEncodeToBytes(System.Byte[])" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlEncodeToBytes (bytes As Byte()) As Byte()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static cli::array &lt;System::Byte&gt; ^ UrlEncodeToBytes(cli::array &lt;System::Byte&gt; ^ bytes);" />
<MemberSignature Language="F#" Value="static member UrlEncodeToBytes : byte[] -&gt; byte[]" Usage="System.Web.HttpUtility.UrlEncodeToBytes bytes" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="bytes" Type="System.Byte[]" />
</Parameters>
<Docs>
<param name="bytes">The array of bytes to encode.</param>
<summary>Converts an array of bytes into a URL-encoded array of bytes.</summary>
<returns>An encoded array of bytes.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Net.WebUtility> class.
]]></format>
</remarks>
<altmember cref="M:System.Web.HttpUtility.UrlDecodeToBytes(System.String)" />
<related type="Article" href="http://msdn.microsoft.com/library/6f67973f-dda0-45a1-ba9d-e88532d7dc5b">How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings</related>
</Docs>
</Member>
<Member MemberName="UrlEncodeToBytes">
<MemberSignature Language="C#" Value="public static byte[] UrlEncodeToBytes (string str);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig unsigned int8[] UrlEncodeToBytes(string str) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlEncodeToBytes(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlEncodeToBytes (str As String) As Byte()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static cli::array &lt;System::Byte&gt; ^ UrlEncodeToBytes(System::String ^ str);" />
<MemberSignature Language="F#" Value="static member UrlEncodeToBytes : string -&gt; byte[]" Usage="System.Web.HttpUtility.UrlEncodeToBytes str" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="str" Type="System.String" />
</Parameters>
<Docs>
<param name="str">The string to encode.</param>
<summary>Converts a string into a URL-encoded array of bytes.</summary>
<returns>An encoded array of bytes.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Net.WebUtility> class.
]]></format>
</remarks>
<altmember cref="M:System.Web.HttpUtility.UrlDecodeToBytes(System.String)" />
<related type="Article" href="http://msdn.microsoft.com/library/6f67973f-dda0-45a1-ba9d-e88532d7dc5b">How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings</related>
</Docs>
</Member>
<Member MemberName="UrlEncodeToBytes">
<MemberSignature Language="C#" Value="public static byte[] UrlEncodeToBytes (string str, System.Text.Encoding e);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig unsigned int8[] UrlEncodeToBytes(string str, class System.Text.Encoding e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlEncodeToBytes(System.String,System.Text.Encoding)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlEncodeToBytes (str As String, e As Encoding) As Byte()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static cli::array &lt;System::Byte&gt; ^ UrlEncodeToBytes(System::String ^ str, System::Text::Encoding ^ e);" />
<MemberSignature Language="F#" Value="static member UrlEncodeToBytes : string * System.Text.Encoding -&gt; byte[]" Usage="System.Web.HttpUtility.UrlEncodeToBytes (str, e)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="str" Type="System.String" />
<Parameter Name="e" Type="System.Text.Encoding" />
</Parameters>
<Docs>
<param name="str">The string to encode</param>
<param name="e">The <see cref="T:System.Text.Encoding" /> that specifies the encoding scheme.</param>
<summary>Converts a string into a URL-encoded array of bytes using the specified encoding object.</summary>
<returns>An encoded array of bytes.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Net.WebUtility> class.
]]></format>
</remarks>
<altmember cref="M:System.Web.HttpUtility.UrlDecodeToBytes(System.String)" />
<related type="Article" href="http://msdn.microsoft.com/library/6f67973f-dda0-45a1-ba9d-e88532d7dc5b">How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings</related>
</Docs>
</Member>
<Member MemberName="UrlEncodeToBytes">
<MemberSignature Language="C#" Value="public static byte[] UrlEncodeToBytes (byte[] bytes, int offset, int count);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig unsigned int8[] UrlEncodeToBytes(unsigned int8[] bytes, int32 offset, int32 count) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlEncodeToBytes(System.Byte[],System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlEncodeToBytes (bytes As Byte(), offset As Integer, count As Integer) As Byte()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static cli::array &lt;System::Byte&gt; ^ UrlEncodeToBytes(cli::array &lt;System::Byte&gt; ^ bytes, int offset, int count);" />
<MemberSignature Language="F#" Value="static member UrlEncodeToBytes : byte[] * int * int -&gt; byte[]" Usage="System.Web.HttpUtility.UrlEncodeToBytes (bytes, offset, count)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="bytes" Type="System.Byte[]" />
<Parameter Name="offset" Type="System.Int32" />
<Parameter Name="count" Type="System.Int32" />
</Parameters>
<Docs>
<param name="bytes">The array of bytes to encode.</param>
<param name="offset">The position in the byte array at which to begin encoding.</param>
<param name="count">The number of bytes to encode.</param>
<summary>Converts an array of bytes into a URL-encoded array of bytes, starting at the specified position in the array and continuing for the specified number of bytes.</summary>
<returns>An encoded array of bytes.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 <xref:System.Net.WebUtility> class.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="bytes" /> is <see langword="null" />, but <paramref name="count" /> does not equal <see langword="0" />.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="offset" /> is less than <see langword="0" /> or greater than the length of the <paramref name="bytes" /> array.
\- or -
<paramref name="count" /> is less than <see langword="0" />, or <paramref name="count" /> + <paramref name="offset" /> is greater than the length of the <paramref name="bytes" /> array.</exception>
<altmember cref="M:System.Web.HttpUtility.UrlDecodeToBytes(System.String)" />
<related type="Article" href="http://msdn.microsoft.com/library/6f67973f-dda0-45a1-ba9d-e88532d7dc5b">How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings</related>
</Docs>
</Member>
<Member MemberName="UrlEncodeUnicode">
<MemberSignature Language="C#" Value="public static string UrlEncodeUnicode (string str);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string UrlEncodeUnicode(string str) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlEncodeUnicode(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlEncodeUnicode (str As String) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::String ^ UrlEncodeUnicode(System::String ^ str);" />
<MemberSignature Language="F#" Value="static member UrlEncodeUnicode : string -&gt; string" Usage="System.Web.HttpUtility.UrlEncodeUnicode str" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netcore-2.0;netcore-2.1;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netstandard-2.0">
<AttributeName>System.Obsolete("This method produces non-standards-compliant output and has interoperability issues. The preferred alternative is UrlEncode(String).")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="str" Type="System.String" />
</Parameters>
<Docs>
<param name="str">The string to convert.</param>
<summary>Converts a string into a Unicode string.</summary>
<returns>A Unicode string in %<paramref name="UnicodeValue" /> notation.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 valid in a URL to 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.
]]></format>
</remarks>
<related type="Article" href="http://msdn.microsoft.com/library/6f67973f-dda0-45a1-ba9d-e88532d7dc5b">How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings</related>
</Docs>
</Member>
<Member MemberName="UrlEncodeUnicodeToBytes">
<MemberSignature Language="C#" Value="public static byte[] UrlEncodeUnicodeToBytes (string str);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig unsigned int8[] UrlEncodeUnicodeToBytes(string str) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlEncodeUnicodeToBytes(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlEncodeUnicodeToBytes (str As String) As Byte()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static cli::array &lt;System::Byte&gt; ^ UrlEncodeUnicodeToBytes(System::String ^ str);" />
<MemberSignature Language="F#" Value="static member UrlEncodeUnicodeToBytes : string -&gt; byte[]" Usage="System.Web.HttpUtility.UrlEncodeUnicodeToBytes str" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netcore-2.0;netcore-2.1;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netstandard-2.0">
<AttributeName>System.Obsolete("This method produces non-standards-compliant output and has interoperability issues. The preferred alternative is UrlEncodeToBytes(String).")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="str" Type="System.String" />
</Parameters>
<Docs>
<param name="str">The string to convert.</param>
<summary>Converts a Unicode string into an array of bytes.</summary>
<returns>A byte array.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## 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 valid in a URL to 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.
]]></format>
</remarks>
<related type="Article" href="http://msdn.microsoft.com/library/6f67973f-dda0-45a1-ba9d-e88532d7dc5b">How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings</related>
</Docs>
</Member>
<Member MemberName="UrlPathEncode">
<MemberSignature Language="C#" Value="public static string UrlPathEncode (string str);" FrameworkAlternate="netcore-2.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netstandard-2.0;netcore-2.1;netframework-4.7.2;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string UrlPathEncode(string str) cil managed" FrameworkAlternate="netcore-2.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netstandard-2.0;netcore-2.1;netframework-4.7.2;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlPathEncode(System.String)" FrameworkAlternate="netcore-2.1;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7.1;netstandard-2.0" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlPathEncode (str As String) As String" FrameworkAlternate="netcore-2.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netstandard-2.0;netcore-2.1;netframework-4.7.2;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::String ^ UrlPathEncode(System::String ^ str);" FrameworkAlternate="netcore-2.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netstandard-2.0;netcore-2.1;netframework-4.7.2;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0" />
<MemberSignature Language="C#" Value="public static string UrlPathEncode (string s);" FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string UrlPathEncode(string s) cil managed" FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="DocId" Value="M:System.Web.HttpUtility.UrlPathEncode(System.String)" FrameworkAlternate="netframework-4.7;netcore-2.0;netframework-4.7.2;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="VB.NET" Value="Public Shared Function UrlPathEncode (s As String) As String" FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::String ^ UrlPathEncode(System::String ^ s);" FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="F#" Value="static member UrlPathEncode : string -&gt; string" Usage="System.Web.HttpUtility.UrlPathEncode s" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.Services</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Web.HttpUtility</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="str" Type="System.String" Index="0" FrameworkAlternate="netcore-2.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netstandard-2.0;netcore-2.1;netframework-4.7.2;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0" />
<Parameter Name="s" Type="System.String" Index="0" FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="str">The text to encode.</param>
<param name="s">The text to encode.</param>
<summary>Do not use; intended only for browser compatibility. Use <see cref="M:System.Web.HttpUtility.UrlEncode(System.String)" />.</summary>
<returns>The encoded text.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>