protected void gvProList_RowCommand1(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "UpdateQty")
        {
            int orderDetailId = int.Parse(e.CommandArgument.ToString());        
            ImageButton btn = e.CommandSource as ImageButton;
            GridViewRow gvr = btn.NamingContainer as GridViewRow;
            //int rowindex = gvr.RowIndex;//gridview当前行号
            TextBox box = gvr.FindControl("txtQty") as TextBox;
            int qty = int.Parse(box.Text);

             //...

       }

   }

相关文章: