webForm:
foreach (Control control in this.Form.Controls)
{
if (control is System.Web.UI.WebControls.TextBox)
{
TextBox tb= (TextBox)control;
tb.Text = "";
}
}
winform:
foreach (System.Windows.Forms.Control control in this.Controls)
{
if (control is System.Windows.Forms.TextBox)
{
System.Windows.Forms.TextBox tb = (System.Windows.Forms.TextBox)control ;
tb.Text = String.Empty ;
}
}