这个东西还是有用处,为了怕以后忘记,我记录在此

   首先:

      GridView1.DataSource = Addcolumn.AllInfo();
        GridView1.DataKeyNames = new string[] { "id" };//注意
        GridView1.DataBind();

 

 

   protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
    {
        Response.Write(GridView1.DataKeys[e.NewEditIndex].Value);//注意 
        this.Panel_Manager.Visible = false;
        this.pl_Add.Visible = true;
        this.Button2.Visible = false;
        this.Button3.Visible = true;

    }

 

当然获取有很多种方法。我觉得这一种最简单;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
  • 2022-01-30
  • 2022-12-23
猜你喜欢
  • 2021-07-15
  • 2022-12-23
  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案