using
System;
using System.Web.UI.WebControls;
using System.Web.UI;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI;
using System.Web;
public class MyClass
{
public static void ResetTextBoxes(Control oControl)
{
foreach (Control
c in oControl.Controls)
{
if (c is
TextBox)
{
TextBox t
= (TextBox)c.FindControl(c.ID);
t.Text =
string.Empty;
}
if
(c.HasControls())
{
ResetTextBoxes(c);
}
}
}//ResetTextBoxes
}
}//ResetTextBoxes
}
Call the above function as: MyClass.ResetTextBoxes(this);
No comments:
Post a Comment