System.Web.UI.WebControls Namespace DetailsView Class
.NET Framework version 2.0
Specifies the template to use for an empty data row when the data source bound to a DetailsView control returns empty, or contains no data.
<asp:detailsview ... >
<itemtemplate>
... template definition here
</itemtemplate>
</asp:detailsview>
An ITemplate interface that defines how an empty data row in the DetailsView control is rendered.
The property is read/write with no default value.
The empty data row is displayed in a DetailsView control when the data source that is bound to the control does not contain any records.
To specify a template for the empty data row, declare an <EmptyDataTemplate> element between the opening and closing tags of the control. You can then list the contents of the template between the opening and closing <EmptyDataTemplate> ... </EmptyDataTemplate>
tags.
To control the style of the empty data row, use the EmptyDataRowStyle property.
Alternatively, you can use the built-in UI for the empty data row by setting the EmptyDataText property instead of this property.
NOTE: If both the EmptyDataText and EmptyDataTemplate properties are set, the EmptyDataTemplate property takes precedence.
DetailsView Members EditItemTemplate EmptyDataRowStyle HeaderTemplate FooterTemplate PagerTemplate