DetailsView vs FormView Control
The DetailsView and FormView controls enable us to display a single data item that is a single database record at a time. Both controls enable display, edit, insert and deletion of data items such as database records but with a condition -single data item at a time. Both the controls, DetailsView and FormView controls support page forward and backward traversing (page forward and backward traversing allow us to move through the records one at a time both in the forward and backward direction).
Each of these two controls render the user interface in its own unique way. This is the major difference between the two controls. The difference is that the FormView control uses a template to display a single database record at a time and the DetailsView control displays a single database record as HTML table.
DetailsView control
The DetailsView control is typically used for updating and inserting new records often in a master/detail scenario. In such a scenario, the selected record of the master control (GridView or ListBox control) determines the record to be displayed in the DetailsView control. For instance, in an ERP application, we use the GridView control to display pending sales order details and the DetailsView control to display the selected single sales order details. We use the <BoundField> elements or <TemplateField> elements to render the DetailsView control. The DetailsView control displays each field of a record as a table row.
The FormView control
The FormView control is designed to display a single data item (single database record) from a data source, for example Sql server database. Unlike the DetailsView control, templates have to be used in the FormView control to display data. The FormView control renders all fields of a single record in a single table row. While using templates, we can place any control such as dropdownlist, checkbox and even we can place tables and rich control like GridView etc. Compared to the DetailsView control, the formView control gives more flexibility over the rendering of fields. This form of rendering data enables more control over the layout of the fields. Using the FormView control is more complex as compared to the DetailsView control. Note that we cannot use <BoundField> elements to render the FormView control.
Summary
Each of these two controls render the user interface in its own unique way. This is the major difference between the two controls. The difference is that the FormView control uses a template to display a single database record at a time and the DetailsView control displays a single database record as HTML table.
DetailsView control
The DetailsView control is typically used for updating and inserting new records often in a master/detail scenario. In such a scenario, the selected record of the master control (GridView or ListBox control) determines the record to be displayed in the DetailsView control. For instance, in an ERP application, we use the GridView control to display pending sales order details and the DetailsView control to display the selected single sales order details. We use the <BoundField> elements or <TemplateField> elements to render the DetailsView control. The DetailsView control displays each field of a record as a table row.

The FormView control
The FormView control is designed to display a single data item (single database record) from a data source, for example Sql server database. Unlike the DetailsView control, templates have to be used in the FormView control to display data. The FormView control renders all fields of a single record in a single table row. While using templates, we can place any control such as dropdownlist, checkbox and even we can place tables and rich control like GridView etc. Compared to the DetailsView control, the formView control gives more flexibility over the rendering of fields. This form of rendering data enables more control over the layout of the fields. Using the FormView control is more complex as compared to the DetailsView control. Note that we cannot use <BoundField> elements to render the FormView control.

Summary
- The DetailsView control is easier to work with.
- The FormView control provides more control over the layout.
- The FormView control uses only the templates with databinding expressions to display data. The DetailsView control uses <BoundField> elements or <TemplateField> elements.
- The FormView control renders all fields in a single table row whereas the DetailsView control displays each field as a table row.
DetailsView Articles
- DataBinding a DetailsView control
- GridView and DetailsView Master/Detail page using SqlDataSource control
- GridView and DetailsView master detail page using ObjectDataSource control
- DropDownList and GridView Master/Detail page using ObjectDataSource control
- DetailsView databound event
- DetailsView integer type conversion error?
- Using detailsview control datakeynames property
- How to get the datakey value in DetailsView control
- DetailsView autogeneraterows property
- DetailsView fields
- Formatting DetailsView control with style properties
- Using Boundfields in DetailsView control
- Display message using EmptyDataTemplate in the DetailsView Control
- How to access DetailsView's fields programmatically
- Bind a DetailsView control with a DropDownList control
- Using Command buttons in DetailsView control
- Using Commandfield element in a DetailsView control
- Using buttonfield in a DetailsView control
Most Viewed
Azure Q & A
Azure Platform
Grid-View
GridView CommandField example
Details-View
GridView and DetailsView Master/Detail page using SqlDataSource control
POCO
POCO overview and advantages - POCO class, Entity Framework in Enterprise Applications
Entity Framework
Query entity data model using linq to entities
Array List
Difference between arraylist and list collection
Web Services
How to create a Web service using Visual Studio.net
Form-View
FormView DataBound Event
Object Oriented Programming
Calling base class constructor in C#
Linq
Convert a sequence to a generic list using ToList()method
ERP
ERP Software Development
Project Ideas
Project ideas for students
AccountingSoftware
Accounting Software
MVC
Creating an ASP.Net MVC 3 application
.Net
Using assemblies in .net applications
ASP .Net
How to implement form validation using ASP.Net 2.0 Validation Controls