这样赋值算不算错
如下
cmd.Parameters.Add("@ID",SqlDbType.Int,8).Value = this.DataGrid1.Items[1].Cells[0].Text;
ViewState[this.DataGrid1.CurrentPageIndex.ToString()] = this.DataGrid1.Items[0].Cells[0].Text;
cmd.Parameters.Add("@ID",SqlDbType.Int,8).Value = ViewState[this.DataGrid1.CurrentPageIndex.ToString()];