asp.net遍历TextBox控件

来源:互联网 发布:sqlserver 定义变量 编辑:程序博客网 时间:2024/05/09 18:15

foreach (Control c in this.form1.Controls)
            {
                if (c.GetType() == typeof(TextBox))
                {
                    TextBox t = (TextBox)c;
                    t.ReadOnly = false;
                }
            }