DetailsView generates a user interface similar to the Form View of a Microsoft Access database, and is typically used for updating/deleting any currently displayed record or for inserting new records. You can delete records with the DetailsView control by enabling its AutoGenerateDeleteButton property to true.
AutoGenerateDeleteButton="true"

When deleting records, you need to supply a value for the DetailsView controls DataKeyNames property. The following ASP.NET program shows how to delete a record from database using DetailsView control.
Default.aspx
Untitled Page
ASP.NET Deatilsview - Related Contents
Advertisement
ASP.NET Related Topics