We can direct select,update and delete the values of the database by Grid View using Linq Data Source.

Introduction

Linq Data Source is used to directly connect to the Sql Data Source. The LinqDataSource control exposes Language-Integrated Query (LINQ) to Web developers through the ASP.NET data-source control architecture

Objective

At first add Linq To Sql Class, by right clicking on the solution Explorer. After adding that you have to add DataClasses.dbml in that add the table from which you want to link the grid view bu just drag and drop the table to the .dbml from the solution explorer..

After that add a LinqDataSource to the .aspx file on clicking on that add data souce that will automatically come on that. After that add the grid view and choose the datasource. Now you can select, insert and delete directly to the data source.