In this example i am going to describe how to Insert record or edit or delete record in GridView using SqlDataSource. For inserting record, i've put textboxes in footer row of GridView using ItemTemplate and FooterTemplate. Go to design view of aspx page and drag a GridView control from toolbox, click on smart tag of GridView and choose new datasource Select Database and click Ok In next screen, Enter your SqlServer name , username and password and pick Database name from the dropdown , Test the connection In next screen, select the table name and fields , Click on Advance tab and check Generate Insert,Edit and Delete statements checkbox , alternatively you can specify your custom sql statements Click OK to finish Check Enable Editing , enable deleting checkbox in gridView smart tag Now go to html source of page and define the DataKeyNames field in gridview source < asp:GridView ...