void CleareAllcontrolsRecursive(Control container)
{
foreach (var control in container.Controls)
{
if (control is TextBox)
{
((TextBox)control).Text = string.Empty;
}
if (control is DropDownList)
{
((DropDownList)control).SelectedValue = "0";
}
}
}
{
foreach (var control in container.Controls)
{
if (control is TextBox)
{
((TextBox)control).Text = string.Empty;
}
if (control is DropDownList)
{
((DropDownList)control).SelectedValue = "0";
}
}
}
No comments:
Post a Comment