The GridView control shows all of the records from its data source control at once, but the DetailsView control displays one row from a data source at a time by rendering an HTML table. The DetailsView supports inserting is to add a SqlDataSource control to the page that has been configured to include the INSERT statements. To enable insert command, set the AutoGenerateInsertButton property to true.
Each DetailsView field has an InsertVisible property that can be set through the Fields dialog box. If this property is set to False, the field does not appear when adding a new record. The following ASP.NET program shows how to insert data in a database using DetailsView control.