protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
string EmployeeID = this.GridView1.DataKeys[e.RowIndex][0].ToString();//Datakeys是一个数据库标题集合;[e.RowIndex]是指当前所在行
string LastName = ((TextBox)this.GridView1.Rows[e.RowIndex].Cells[0].Controls[0]).Text.ToString();
Response.Write(LastName);
}
Controls[0]这个是什么意思越详细越好;;还是就是一般什么时候加()比方说:ToString();
e.NewEditIndex;e.NewPageIndex;
{
string EmployeeID = this.GridView1.DataKeys[e.RowIndex][0].ToString();//Datakeys是一个数据库标题集合;[e.RowIndex]是指当前所在行
string LastName = ((TextBox)this.GridView1.Rows[e.RowIndex].Cells[0].Controls[0]).Text.ToString();
Response.Write(LastName);
}
Controls[0]这个是什么意思越详细越好;;还是就是一般什么时候加()比方说:ToString();
e.NewEditIndex;e.NewPageIndex;
是方法后面都要用到(),还有显示转换也要用到,其他的暂时想不到
应该是一个表中的某一行上某一个单元格里面可以包含若干个控件,才这样写的