后台查找页面上所有的TextBox控件

呵呵~记下来
 

      foreach (Control txtobj in this.Page.Controls)
        {
            if (txtobj.GetType().Name == "TextBox")
            {
                //((TextBox)txtobj).Text = ""; 
                TextBox tb = new TextBox();
                tb = (TextBox)this.FindControl(txtobj.ID);
                tb.Text = "";
            }
        } 

你可能感兴趣的:(text)