System.Web.UI.WebControls.BoundField.FormatDataValue Method

Formats the specified field value for a cell in the System.Web.UI.WebControls.BoundField object.

Syntax

protected virtual string FormatDataValue (object value, bool encode)

Parameters

value
Documentation for this section has not yet been entered.
encode
true to encode the value; otherwise, false.

Returns

The field value converted to the format specified by BoundField.DataFormatString.

Remarks

The BoundField.FormatDataValue(object, bool) method is a helper method used to transform a field value to the format specified by the BoundField.DataFormatString property. If a field value is null, the value of the BoundField.NullDisplayText property is returned.

Note:

This method is used primarily by control developers.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0