ImageField.NullDisplayText Property
Assembly: System.Web (in system.web.dll)
[LocalizableAttribute(true)] public: virtual property String^ NullDisplayText { String^ get (); void set (String^ value); }
/** @property */ public String get_NullDisplayText () /** @property */ public void set_NullDisplayText (String value)
public function get NullDisplayText () : String public function set NullDisplayText (value : String)
Property Value
The text to display when the value of a field is a null reference (Nothing in Visual Basic). The default is an empty string (""), which indicates that this property is not set.When the value of the field specified by the DataImageUrlField property is a null reference (Nothing in Visual Basic), an image cannot be displayed in an ImageField object. Use the NullDisplayText property to specify the text to display in the image's place. The text usually indicates that the normal image is not available or cannot be found.
Note |
|---|
| As an alternative, you can display an alternate image when the field value is a null reference (Nothing in Visual Basic) by setting the NullImageUrl property instead of this property. If the NullImageUrl and NullDisplayText properties are both set, the NullImageUrl property has precedence. |
The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see LocalizableAttribute and ASP.NET Globalization and Localization.
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Note