protected void modDeleteCommand(Object sender, GridViewDeleteEventArgs e) { int id = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value); ClassTitleName t = new ClassTitleName(); t.TITLE_ID = id; t.DeleteTitleName(); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('ลบข้อมูลเรียบร้อย')", true); GridView1.EditIndex = -1; BindData1(); }