Updating with gridview Add me on skype for a free live sex chat

17 Dec

In general, we set the Auto Generate Edii Button property on the Grid View to true so that we can make advantages of the automatically generated buttons.

I have specified Data Key Names as Auto ID, the primary key of the database table.In practical scenario you should use your existing architecture to populate and update the data.In this article, I am going to take a simple database table that has following fields: Auto ID - Int, Auto Increment, Primary Key Page Name - Varchar(50) Page Description - Varchar(500) Active - Bit(1) In this article, I am not going to explain the workings of Sql objects but focusing on the events and methods of the Grid View that will help us in updating and deleting the records.To populate the Grid View, I am calling Bind Data() method from Page_Load event after checking Is Post Back property of the page, so the Grid View will only be populated when there is no postback on the page (when the page loads for the first time).This will make sure that Bind Data() method will not fire when you are going to edit, update or delete the record.