Share via


HttpRuntimeSection.EncoderType 屬性

定義

取得或設定可用於處理 HTML 及 URL 編碼之自訂類型的名稱。

public:
 property System::String ^ EncoderType { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("encoderType", DefaultValue="System.Web.Util.HttpEncoder")]
[System.Configuration.StringValidator(MinLength=1)]
public string EncoderType { get; set; }
[<System.Configuration.ConfigurationProperty("encoderType", DefaultValue="System.Web.Util.HttpEncoder")>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.EncoderType : string with get, set
Public Property EncoderType As String

屬性值

類型的名稱,這個類型可用於處理 HTML 和 URL 編碼。

屬性

備註

ASP.NET 使用 HttpEncoder 類型做為 HTML 和 URL 編碼工作的預設處理常式。

若要自訂編碼行為,您可以建立繼承自 型別的 HttpEncoder 類別。 在應用程式的組態檔中,您接著將 EncoderType 專案的 屬性 httpRuntime 設定為自訂類型的完整字串名稱。 如需詳細資訊,請參閱 HTTPRuntime 元素 (ASP.NET 設定架構)

適用於