//int hangchon = 0; protected void GirdView1_RowCommand(object sender, GridViewCommandEventArgs e) { int index = int.Parse(e.CommandArgument.ToString()); if (e.CommandName == "Select") { Response.Redirect("Suabaiviet.aspx?ID=" + GridView1.Rows[int.Parse(e.CommandArgument.ToString())].Cells[0].Text); //txtTieuDe.Text = GridView1.Rows[int.Parse(e.CommandArgument.ToString())].Cells[2].Text; //txtNoiDung.Text = } else if (e.CommandName == "del") { //chưa viết //hangchon = int.Parse(e.CommandArgument.ToString()); dt.delete_ID(int.Parse(GridView1.Rows[int.Parse(e.CommandArgument.ToString())].Cells[0].Text)); Response.Redirect("quanly.aspx"); //GridView1.DeleteRow(hangchon); } }