October 2010
Intermediate to advanced
1920 pages
73h 55m
English
DetailsView ControlYou can delete records with the DetailsView control by enabling its AutoGenerateDelete Button property. The page in Listing 12.16 enables you to both insert and delete records in the Movies database table.
Listing 12.16. ShowDelete.aspx


When deleting records, you need to supply a value for the DetailsView control’s DataKeyNames property. A parameter named @Id represents the value of the ID column in the DeleteCommand property.