by Nathan
15. July 2009 11:04
There are multiple ways of doing this ie using JavaScript, but this is the server side solution.
You can adapt this method for several other solutions:
foreach (Control c in this.Page.Controls)
{
if(c.GetType().FullName.Equals("System.Web.UI.HtmlControls.HtmlForm")) {
foreach (Control cForm in c.Controls)
{
if(cForm.GetType().Equals(typeof(TextBox))) {
((TextBox)(cForm)).Text = "";
}
}
}
}