BoundField::NullDisplayText Property
Gets or sets the caption displayed for a field when the field's value is null.
Assembly: System.Web (in System.Web.dll)
public: virtual property String^ NullDisplayText { String^ get (); void set (String^ value); }
Property Value
Type: System::StringThe caption displayed for a field when the field's value is null. The default is an empty string (""), which indicates that this property is not set.
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 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 ConvertEmptyStringToNull property to true. |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, 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.
Note