語言

HttpEncoder.HtmlDecode(String, TextWriter) 方法

定義

從 HTML 編碼的字串中解碼一個值。

protected public:
 virtual void HtmlDecode(System::String ^ value, System::IO::TextWriter ^ output);
protected internal virtual void HtmlDecode(string value, System.IO.TextWriter output);
abstract member HtmlDecode : string * System.IO.TextWriter -> unit
override this.HtmlDecode : string * System.IO.TextWriter -> unit
Protected Friend Overridable Sub HtmlDecode (value As String, output As TextWriter)

參數

value
String

要解碼的字串。

output
TextWriter

寫入解碼值的文字寫入器。

例外狀況

output 是 null。

備註

下表列出 ASP.NET 解碼邏輯可解碼的字元序列。

字元順序 規則
&#NNN; (ASCII 字元的十進位編碼)。 解碼為指定的 ASCII 字元。 字元序列從 # 字元後的第一個數字開始,結束於分號。
&#xZZ; (ASCII 字元的十六進位碼)。 解碼為指定的 ASCII 字元。 編碼形式以十六進位字元取代十進位值來指定字元。 字元序列從 # 字元後的第一個數字開始,結束於分號。
命名的 HTML 實體。 解碼為等效的 ASCII 字元。

適用於