如何获取GridView中的值

前台:
=========================================================                                               


                                               
                                                   
                                                       
                                                           
                                                       

                                                   

                                                   
                                                       
                                                       
                                                   

                                                   
                                                       
                                                           
                                                       

                                                   

                                               

                                               
                                           

后台:
=========================================================

protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
 //获取ID的值
        string strId = this.GridView1.Rows[e.RowIndex].Cells[1].Text.Trim();
 //获取LinkButton1的控件
        LinkButton lb = (LinkButton)GridView1.Rows[e.RowIndex].FindControl("LinkButton1");
        Label17.Text = lb.Text.ToString();
        contion += " and product.babyClassId = " + strId;
        Bind_DataList(contion, 3);
        e.Cancel = true;
    } 

你可能感兴趣的:(如何获取GridView中的值)