I am trying to delete a record from my gridview. My code is:
protected void edit_record_RowDeleting(object sender, GridViewDeleteEventArgs e)
delete_record_method.Record_ID = ((TextBox)user_records.Rows[e.RowIndex].Cells.Controls).Text.ToString();
delete_record_method.Stored_Procedure_Name = "dbo.removed";
I am getting an error which reads:
Specified argument was out of the range of valid values.
Parameter name: index
I am not sure how to fix this.