How To Delete Database Records In Asp.Net


show more Deleting database records provides you with in-depth training on Developer. Taught by David Gassner as part of the ASP.NET Essential Training show less
please wait ...

Deleting database records

The final task in a data entry system is to give the user a way to delete records from the server-side database. The GridView control gives you a very easy way to do this simply by enabling the Delete functionality. I will be working with the file Authors. aspx. In this file, there is already a GridView control, which is bound to the SQLDataSource control at the bottom of the page. The SQLDataSource was created with the Delete command with the parameter that allows the Delete command to be filtered on a single record's primary key.

To turn-on Delete functionality, I'll go into Design View first. I'll select the GridView and then open its Task list and I'll select Enable Deleting. This results in creating a Delete column on the left side of the GridView. Now I'm going to edit the columns so I can group the Edit link and the Delete link together. I'll click Edit Columns, I'll go to the Selected fields list and choose Delete. And then I'll click the Down Arr...

Deleting database records
Video duration: 2m 35s 6h 24m Beginner Updated Feb 13, 2013

Viewers:

Deleting database records provides you with in-depth training on Developer. Taught by David Gassner as part of the ASP.NET Essential Training

Subjects:
Developer Web
Software:
ASP.NET
Author:
please wait ...