C#循环页面form中控件

 /// <summary>
    /// 循环整个form
    /// </summary>
    /// <param name="control">form</param>
    private void GetValue(Control control)
    {   
        if (control.HasControls())
        {
            foreach (Control c in control.Controls)
            {
                if (c is TextBox)
                {}

    }

    }

  }

posted @ 2013-01-17 15:41  丁焕轩  阅读(1197)  评论(0编辑  收藏  举报