HttpRuntimeSection.EncoderType 属性
定义
获取或设置可用于处理 HTML 和 URL 编码的自定义类型的名称。Gets or sets the name of a custom type that can be used to handle HTML and URL encoding.
public:
property System::String ^ EncoderType { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("encoderType", DefaultValue=Mono.Cecil.CustomAttributeArgument)]
[System.Configuration.StringValidator(MinLength=1)]
public string EncoderType { get; set; }
[<System.Configuration.ConfigurationProperty("encoderType", DefaultValue=Mono.Cecil.CustomAttributeArgument)>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.EncoderType : string with get, set
Public Property EncoderType As String
属性值
可用于处理 HTML 和 URL 编码的类型的名称。The name of a type that can be used to handle HTML and URL encoding.
- 属性
注解
ASP.NET 使用 HttpEncoder 类型作为 HTML 和 URL 编码任务的默认处理程序。ASP.NET uses the HttpEncoder type as the default handler for HTML and URL encoding tasks.
若要自定义编码行为,可以创建一个继承自该类型的类 HttpEncoder 。To customize encoding behavior, you can create a class that inherits from the HttpEncoder type. 在应用程序的配置文件中,将 EncoderType 元素的属性设置 httpRuntime 为自定义类型的完全限定字符串名称。In the configuration file for an application, you then set the EncoderType attribute of the httpRuntime element to the fully qualified string name of the custom type. 有关详细信息,请参阅 HttpRuntime 元素 (ASP.NET Settings Schema) 。For more information, see httpRuntime Element (ASP.NET Settings Schema).