gridview objectdatasource 刪除

  • 434
  • 0

一定要設primary key

gridview

DataKeyNames="EmployeeID"

 

protected void Page_Load(object sender, EventArgs e)
        {
           GridView1.DataKeyNames = new string[1] { "EmployeeID" };
        }