private void Button1_Click(object sender, System.EventArgs e)
{
Control myForm = Page.FindControl(“Form1″);
foreach (Control ctl in myForm.Controls)
{
if(ctl.GetType().ToString().Equals(“System.Web.UI.WebControls.TextBox”))
{
((TextBox)ctl).Text = “”;
}
}
}
This will clear EVERYTHING from the textboxes – even if you had them pre-populated
with data. A simple way to just reset it to the condition at Page_Load time, just
do this in the Reset SubRoutine: Server.Transfer(“YourPageName.aspx”)