模板行是一行 int i_RowIndex = ((GridViewRow)((Button)e.CommandSource).NamingContainer).RowIndex; //取当前行的行号 Label lb = GridView1.Rows[i_RowIndex].Cells[0].FindControl("Label1") as Label; //取当前行的label的值 if (lb==null) { return; }