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); nbsp;
tb.Text = "" ;
}
}
{
if (txtobj.GetType().Name == " TextBox " )
{
// ((TextBox)txtobj).Text = ""; // 这是第一种方法赋值,第二种在下面
TextBox tb = new TextBox();
tb = (TextBox) this .FindControl(txtobj.ID); nbsp;
tb.Text = "" ;
}
}