System.Web.UI.WebControls.DetailsView.EmptyDataText Property

Gets or sets the text to display in the empty data row rendered when a System.Web.UI.WebControls.DetailsView control is bound to a data source that does not contain any records.

Syntax

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

Value

Documentation for this section has not yet been entered.

Remarks

The empty data row is displayed in a System.Web.UI.WebControls.DetailsView control when the data source that is bound to the control does not contain any records. Use the DetailsView.EmptyDataText property to specify the text to display in the empty data row. To control the style of the empty data row, use the DetailsView.EmptyDataRowStyle property. Alternatively, you can define your own custom user interface (UI) for the empty data row by setting the DetailsView.EmptyDataTemplate property instead of this property.

Note:

If both the DetailsView.EmptyDataText and DetailsView.EmptyDataTemplate properties are set, the DetailsView.EmptyDataTemplate property takes precedence.

The value of DetailsView.EmptyDataText is stored in view state.

The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see System.ComponentModel.LocalizableAttribute and ASP.NET Globalization and Localization.

Requirements

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