IFieldFormattingOptions.HtmlEncode Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets a value that indicates whether the data for the control is HTML-encoded before it is rendered.

Namespace:   System.Web.DynamicData
Assembly:  System.Web.DynamicData (in System.Web.DynamicData.dll)

bool HtmlEncode { get; }

Property Value

Type: System.Boolean

true if the data for the control is HTML-encoded before it is rendered; otherwise, false.

HTML-encoding field values helps prevent cross-site scripting attacks and malicious content from being rendered to the browser. This property should be enabled unless you trust the content or have checked for malicious content in another way.

.NET Framework
Available since 3.5
Return to top
Show: