System.Web.UI.WebControls.BoundField.NullDisplayText Property

Gets or sets the caption displayed for a field when the field's value is null.

Syntax

[System.ComponentModel.DefaultValue("")]
public virtual string NullDisplayText { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Sometimes a field's value is stored as null in the data source. You can specify a custom caption to display for fields that have a null value by setting the BoundField.NullDisplayText property. If this property is not set, null field values are displayed as empty strings (""). When a record is being updated or inserted in a data-bound control, if the user enters the value specified by this property (other than an empty string) for a field in a data-bound control, that value is automatically converted to null in the data source.

Note:

To convert an empty string field value to a null value, set the BoundField.ConvertEmptyStringToNull property to true.

Requirements

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