DetailsView.EmptyDataTemplate Property
Assembly: System.Web (in system.web.dll)
[TemplateContainerAttribute(typeof(DetailsView))] public: virtual property ITemplate^ EmptyDataTemplate { ITemplate^ get (); void set (ITemplate^ value); }
/** @property */ public ITemplate get_EmptyDataTemplate () /** @property */ public void set_EmptyDataTemplate (ITemplate value)
public function get EmptyDataTemplate () : ITemplate public function set EmptyDataTemplate (value : ITemplate)
Not applicable.
Property Value
A System.Web.UI.ITemplate that contains the custom content for the empty data row. The default value is a null reference (Nothing in Visual Basic), which indicates that this property is not set.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. You can define your own custom user interface (UI) for the empty data row by using the EmptyDataTemplate property. To specify a custom template for the null row, first place <EmptyDataTemplate> tags between the opening and closing tags of the DetailsView control. You can then list the contents of the template between the opening and closing <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. |
Note: