Question: ASP Gridview Update and Delete button not working. Hi there, I am working with an asp gridview connected to an sql database and am trying

ASP Gridview Update and Delete button not working.

Hi there, I am working with an asp gridview connected to an sql database and am trying to implement an update and delete function but it does not work.

I keep getting this error whenever I try. Error reading the database. Index was out of range. Must be non-negative and less than the size of the collection.

below is my code

ASP Gridview Update and Delete button not working. Hi there, I am

working with an asp gridview connected to an sql database and am

trying to implement an update and delete function but it does not

work. I keep getting this error whenever I try. Error reading the

Whenever I hit the Update or Delete button I get the error. I'm mostly focusing on trying to edit the movie title and description and movie ID as well.

Error reading the database. Index was out of range. Must be non-negative and less than the size of the collection.

asp : GridView runat-"server" 1D-"movieResults" Wrap-"true" Visible-"false" AutoGenerateColumns-"false" OnRowEditing-"btnSubmit_Click_one" OnRowUpdating-"btnSubmit_update_record" OnRowDeleting-"btnSubmit_delete_record" 97 98 Kasp: BoundField DataField-"DateChecked" HeaderText "Date Checked"> asp :BoundField DataField-"CheckedOut" HeaderText-"Checked Out" /> Kasp: ImageField DataImageUrlField-"ImageLocation" ControlStyle-Width-"Se" 100 101 102 103 104 105 106 107 108 109 ControlStyle-Height"50" HeaderText"Movie Image" /> asp : CommandField ShowEditButton="true" ShonDeleteButton="true" /> :GridView> asp :Label ID-'IblInfo" runat-"server">Label >

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!