Class HttpUtility
Provides methods for encoding and decoding HTML and URL strings.
Inheritance
System.Object
HttpUtility
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Browser
Assembly: OpenSilver.Browser.dll
Syntax
public static class HttpUtility
Methods
| Improve this Doc View SourceHtmlDecode(String)
Converts a string that has been HTML-encoded (for HTTP transmission) into a decoded string.
Declaration
public static string HtmlDecode(string html)
Parameters
Type | Name | Description |
---|---|---|
System.String | html | An HTML-encoded string to decode. |
Returns
Type | Description |
---|---|
System.String | A decoded string. |
HtmlEncode(String)
Converts a text string into an HTML-encoded string.
Declaration
public static string HtmlEncode(string html)
Parameters
Type | Name | Description |
---|---|---|
System.String | html | The text to HTML-encode. |
Returns
Type | Description |
---|---|
System.String | An HTML-encoded string. |
UrlDecode(String)
Converts a string that has been encoded for transmission in a URL into a decoded string.
Declaration
public static string UrlDecode(string url)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | A URL-encoded string to decode. |
Returns
Type | Description |
---|---|
System.String | A decoded string. |
UrlEncode(String)
Converts a text string into a URL-encoded string.
Declaration
public static string UrlEncode(string url)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | The text to URL-encode. |
Returns
Type | Description |
---|---|
System.String | A URL-encoded string. |