日期:2014-05-18 浏览次数:20909 次
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { queryControl(); } } public void queryControl() { //System.Web.UI.WebControls.TextBox control; foreach (System.Web.UI.Control control in this.Controls) { if (control is System.Web.UI.WebControls.TextBox) { System.Web.UI.WebControls.TextBox tb = (System.Web.UI.WebControls.TextBox)control; tb.BackColor = System.Drawing.Color.Red; tb.Visible = false; } } }