protected void Button2_Click(object sender, EventArgs e)
        {
            GridViewRow row = ((Button)sender).Parent.Parent as GridViewRow;

         string id = GridView1.DataKeys[row.RowIndex].Value.ToString(); //获得该行主键
        }

相关文章:

  • 2022-12-23
  • 2021-09-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-13
猜你喜欢
  • 2021-09-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-17
相关资源
相似解决方案