编译错误 
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。 编译器错误信息: CS0117: “System.Web.UI.WebControls.GridViewUpdatedEventArgs”并不包含“RowIndex”的定义源错误: 行 27:         
行 28:         Define E = new Define();
行 29:         E.class_id = ((TextBox)(GridView1.Rows[e.RowIndex].Cells[1].Controls[0])).Text.ToString().Trim();
行 30:         E.stu_name=((TextBox)(GridView1.Rows[e.RowIndex].Cells[2].Controls[0])).Text.ToString().Trim();
行 31:         E.stu_sex = ((TextBox)(GridView1.Rows[e.RowIndex].Cells[3].Controls[0])).Text.ToString().Trim();
 

解决方案 »

  1.   

    这个类没有RowIndex定义,你非要写上去,那还能不错么~~
      

  2.   

    应为GridViewUpdatedEventArgs类里面没有rowindex这个属性。
      

  3.   

    你是要用RowUpdating事件吧,Updated事件力里不能这样用
      

  4.   


        protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            //这个事件里有e.RowIndex
        }
        protected void GridView1_RowUpdated(object sender, GridViewUpdatedEventArgs e)
        {
            //这个事件里没有e.RowIndex
        }大多数情况下我们研究的是RowUpdating事件而不是RowUpdated事件,楼主看看是不是自己用错事件了
      

  5.   

    RowUpdating事件吧,Updated事件我也蒙了 
      

  6.   

    RowUpdating 就是和Updated事件容易混。