Label lbl=(Label) GridView14.SelectedRow().FindControl("Label1")

解决方案 »

  1.   

    GridViewRow gvr = (GridViewRow)((Control)e.CommandSource).Parent.Parent;
    Label lbl1 = gvr.FindControl("Label1");
      

  2.   

    GridViewRow row = (GridViewRow)((Control)e.CommandSource).Parent.Parent;
            Label   lbl = (Label)row.Cells[0].FindControl("Label1")
      

  3.   

    GridViewRow gvr = (GridViewRow)((Control)e.CommandSource).Parent.Parent;
    Label lbl1 = (Label)gvr.FindControl("Label1");
      

  4.   

    还有其他的答案吗,以上两种方案均高失败。!也许我没明白。
    GridViewRow   gvr   =   (GridViewRow)((Control)e.CommandSource).Parent.Parent; 
    Label   lbl1   =   (Label)gvr.FindControl("Label1");
    用这个的话 我得这个lbl1 存入数据库时,提示我没有实例化  
      

  5.   

    什么意思,lbl1是Label控件啊
    你要取它的Text值啊