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

要在其中寫入解碼值的文字寫入器。

例外狀況

outputnull

備註

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

字元序列 規則
&#NNN; (ASCII 字元) 的十進位代碼。 解碼為指定的 ASCII 字元。 字元序列會從 # 字元之後的第一個數位開始,並在分號完成。
&#xZZ; (ASCII 字元) 的十六進位代碼。 解碼為指定的 ASCII 字元。 編碼格式會使用十六進位字元來指定字元,而不是十進位值。 字元序列會從 # 字元之後的第一個數位開始,並在分號完成。
具名 HTML 實體。 解碼為對等 ASCII 字元。

適用於