Mass Delete Using Gridview with Checkboxes

Posted on ASP.NET 101 See other posts from ASP.NET 101
Published on Mon, 14 Jan 2008 17:36:32 GMT Indexed on 2010/03/18 18:21 UTC
Read the original article Hit count: 222

Filed under:
This sample shows how to use a Gridview to delete multiple records all at once, having marked them with a Checkbox, and clicking one button, external to the Gridview, to delete them all

As usual, here, we're using the Northwind Database. If you want to try this on your own Northwind database, adhere to this word of caution - "BACK IT UP FIRST". You will be making multiple deletes, so in order to get it back to the original state, you must make a backup and then restore afterwards.

Remember too, that you will need to substitute your own Web.Config connectionstring entry for "YourNorthwindString" in the sample code

© ASP.NET 101 or respective owner