编程遍历页面上所有TextBox控件并给它赋值为string.Empty(用C#语言)

foreach(Control c in this.controls)
{
if(c is TextBox)
{
TextBox cc=(TextBox)c;
cc.Text=string.empty;
}
}

你可能感兴趣的:(编程遍历页面上所有TextBox控件并给它赋值为string.Empty(用C#语言))