HtmlDecode Method
Collapse the table of content
Expand the table of content

HttpUtility.HtmlDecode Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Converts a string that has been HTML-encoded (for HTTP transmission) into a decoded string.

Namespace:  System.Net
Assembly:  System.Windows (in System.Windows.dll)

public static string HtmlDecode(
	string html
)

Parameters

html
Type: System.String
An HTML-encoded string to decode.

Return Value

Type: System.String
A decoded string.

Strings that contain HTML-encoded, character-entity equivalents such as < and > are displayed as text, not as HTML code, unless they are decoded.

A browser displays the following as a string of text:

<p> Hello world >/p<

However, if the string is decoded first, the browser displays it as follows and recognizes the paragraph tag:

<p> Hello world </p>

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft