worked correctly...great work
private void ClearTextBoxes(Control control) { foreach (Control c in control.Controls) { if (c is TextBox) { ((TextBox)c).Clear(); } if (c.HasChildren) { ClearTextBoxes(c); } if (c is CheckBox) { ((CheckBox)c).Checked = false; } if (c is RadioButton) { ((RadioButton)c).Checked = false; } } }
can u pls ,mention the reference used,lik 'using System.Web.UI.WebControls' .which s the reference used in the code u specified...
Post a Comment
3 comments:
worked correctly...great work
private void ClearTextBoxes(Control control)
{
foreach (Control c in control.Controls)
{
if (c is TextBox)
{
((TextBox)c).Clear();
}
if (c.HasChildren)
{
ClearTextBoxes(c);
}
if (c is CheckBox)
{
((CheckBox)c).Checked = false;
}
if (c is RadioButton)
{
((RadioButton)c).Checked = false;
}
}
}
can u pls ,mention the reference
used,lik 'using System.Web.UI.WebControls' .which s the reference used in the code u specified...
Post a Comment