HttpRuntimeSection.EncoderType 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定一個自訂型別的名稱,可用於處理 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 Element(ASP.NET 設定結構)。