This documentation is archived and is not being maintained.

IFieldFormattingOptions::HtmlEncode Property

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)

property bool HtmlEncode {
	bool 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

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: