遍历页面上的所有TextBox

 1protected void setTextBoxValueNUll()
 2    {
 3        HtmlForm from = (HtmlForm)this.FindControl("form1");
 4        for (int i = 0; i < from.Controls.Count; i++)
 5        {
 6            if (from.Controls[i] is TextBox)
 7            {
 8                TextBox tb = from.Controls[i] as TextBox;
 9                tb.Text = "";
10            }

11        }

12    }
原文地址:https://www.cnblogs.com/kevinge/p/1249777.html