//Fires on updating a row protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e) { int id = int.Parse((GridView1.Rows[e.RowIndex].Cells[2]).Text); string audio_name = ((TextBox)(GridView1.Rows[e.RowIndex].Cells[4].Controls[0])).Text; int listens = int.Parse(((TextBox)(GridView1.Rows[e.RowIndex].Cells[5].Controls[0])).Text); DateTime UpDate = DateTime.Parse(((TextBox)(GridView1.Rows[e.RowIndex].Cells[6].Controls[0])).Text); string filename = ((TextBox)(GridView1.Rows[e.RowIndex].Cells[7].Controls[0])).Text; string desc = ((TextBox)(GridView1.Rows[e.RowIndex].Cells[8].Controls[0])).Text; GridView1.EditIndex = -1; AudioFiles.UpdateAudio(id, audio_name, listens, UpDate, filename, desc); Refresh(); }