lists the different template in formveiw control asp.net

For the FormView control to display content, you need to create templates for the different parts of the control.

Most templates are optional; however, you must create a template for the mode in which the control is configured.

For example, a FormView control that supports inserting records must have an insert item template defined.

The following table lists the different templates that you can create. 

EditItemTemplate

Defines the content for the data row when the FormView control is in edit mode.

This template usually contains input controls and command buttons with which the user can edit an existing record. 

EmptyDataTemplate

Defines the content for the empty data row displayed when the formveiw control asp.net is bound to a data source that does not contain any records.

This template usually contains content to alert the user that the data source does not contain any records.

FooterTemplate

Defines the content for the footer row.

This template usually contains any additional content you would like to display in the footer row. 

Note:- As an alternative, you can simply specify text to display in the footer row by setting the FooterText property. 

HeaderTemplate

Defines the content for the header row.

This template usually contains any additional content you would like to display in the header row. 

Note:- As an alternative, you can simply specify text to display in the header row by setting the HeaderText property. 

ItemTemplate

Defines the content for the data row when the FormView control is in read-only mode.

This template usually contains content to display the values of an existing record.

InsertItemTemplate

Defines the content for the data row when the FormView control is in insert mode.

This template usually contains input controls and command buttons with which the user can add a new record. 

PagerTemplate

Defines the content for the pager row displayed when the paging feature is enabled (when the AllowPaging property is set to true).

This template usually contains controls with which the user can navigate to another record.

Note:- The FormView control has a built-in pager row user interface (UI). You need to create a pager template only if you want to create your own custom pager row. 

 

Join Our WhatsApp Channel Join Now
Join Our Telegram Group Join Now