HyperLinkField.DataTextField Property
Assembly: System.Web (in system.web.dll)
public: virtual property String^ DataTextField { String^ get (); void set (String^ value); }
/** @property */ public String get_DataTextField () /** @property */ public void set_DataTextField (String value)
public function get DataTextField () : String public function set DataTextField (value : String)
Property Value
The name of the field from the data source containing the values to display for the hyperlink captions in the HyperLinkField. The default is an empty string (""), which indicates that this property is not set.Use the DataTextField property to specify the name of the field that contains the text to display for the hyperlink captions in the HyperLinkField object.
Instead of using this property to bind the hyperlink captions to a field, you can use the Text property to set the hyperlink captions to a static value. With this option, each hyperlink shares the same caption.
Note |
|---|
| If the DataTextField and Text properties are both set, the DataTextField property takes precedence. |
The following code example demonstrates how to use the DataTextField property to specify a field from the data source to bind to the hyperlink captions displayed in a HyperLinkField object.
The following code example demonstrates how to use the DataTextFormatString property to format the values bound to the hyperlink captions displayed in a HyperLinkField object. The values are formatted as currency.
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