Gets or sets the custom content for the data row in a System.Web.UI.WebControls.FormView control when the control is in read-only mode.
Documentation for this section has not yet been entered.
The System.Web.UI.WebControls.FormView control renders a different template for the data row based on the current mode of the control (specified by the FormView.CurrentMode property). The following table shows which template is used for each mode.
| Edit | |
| Insert | |
| Read-only |
Use the FormView.ItemTemplate property to define your own user interface (UI) for the data row when the System.Web.UI.WebControls.FormView control is in read-only mode. The item template usually contains controls to display the field values of a record, as well as command buttons to edit, insert, and delete a record.
To specify the custom template, first place <ItemTemplate> tags between the opening and closing tags of the System.Web.UI.WebControls.FormView control. You can then list the contents of the template between the opening and closing <ItemTemplate> tags. To display the field values of the data source bound to the control, use a data-binding expression. For more information on data-binding expressions, see Data Binding Expression Syntax. To create command buttons that perform the built-in delete, edit, and new record operations, add a command button control to the template with its CommandName property set to one of the values listed in the following table.
| Delete |
"Delete" |
| Edit |
"Edit" |
| New |
"New" |
You can control the appearance of the item template by using the FormView.RowStyle property.