aspnet-devexpress-dot-web-dot-aspxwebcontrol-6a861f06.md
Disabling this property may introduce security-related issues. Review the following help topic and learn how to protect websites from cross-site scripting (XSS) attacks: HTML Encoding.
Gets or sets whether to encode editor value and content.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue(true)]
public virtual bool EncodeHtml { get; set; }
<DefaultValue(True)>
Public Overridable Property EncodeHtml As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | true |
true to encode editor value and content and display them as text, false to not encode editor value and content and render them as HTML markup.
|
The control converts service characters (for instance, < and >) in its content to character entity references (< and >) and displays HTML code as text. Set the EncodeHtml property to false to prevent such a convertion and render the control’s content as HTML markup.
The following example illustrates how to use the ASPxWebControl.EncodeHtml property.
<dx:ASPxComboBox runat="server" Caption="<b>Preload mode</b> [<a title='Preload description...' href='javascript:;'>?</a>]" EncodeHtml="false">
<Items>
<dx:ListEditItem Text="None" />
<dx:ListEditItem Text="Metadata" />
<dx:ListEditItem Text="Auto" />
</Items>
</dx:ASPxComboBox>
See Also