Back to Devexpress

ASPxGridViewCommandButtonSettings.EncodeHtml Property

aspnet-devexpress-dot-web-dot-aspxgridviewcommandbuttonsettings.md

latest2.9 KB
Original Source

ASPxGridViewCommandButtonSettings.EncodeHtml Property

SECURITY-RELATED CONSIDERATIONS

Enable this property to protect your website from cross-site scripting (XSS) attacks. Review the following help topic to learn more: HTML Encoding.

Gets or sets whether to encode command button text strings.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(false)]
public bool EncodeHtml { get; set; }
vb
<DefaultValue(False)>
Public Property EncodeHtml As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true to encode command button text strings and display them as text, false to not encode command button text strings and render them as HTML markup.

|

Property Paths

You can access this nested property as listed below:

LibraryObject TypePath to EncodeHtml
ASP.NET MVC ExtensionsGridViewSettings

.SettingsCommandButton .EncodeHtml

| | MVCxGridViewProperties |

.SettingsCommandButton .EncodeHtml

| | ASP.NET Web Forms Controls | ASPxGridView |

.SettingsCommandButton .EncodeHtml

| | GridViewProperties |

.SettingsCommandButton .EncodeHtml

|

Remarks

The ASPxGridView control renders text strings in commands buttons as HTML markup. Set the EncodeHtml property to true to convert service characters (for instance, < and >) in these strings to character entity references (&lt; and &gt;) and display HTML code as text.

See Also

Text

Command Item

ASPxGridViewCommandButtonSettings Class

ASPxGridViewCommandButtonSettings Members

DevExpress.Web Namespace