protected void BtnCancel_Click(object sender, EventArgs e)
{
Control myForm = Page.FindControl("iii");
foreach (Control ctl in myForm.Controls)
{
if (ctl.GetType().ToString().Equals("System.Web.UI.WebControls.TextBox"))
{
((TextBox)ctl).Text = "";
}
else if (ctl.GetType().ToString().Equals("System.Web.UI.WebControls.DropDownList"))
{
((DropDownList)ctl).ClearSelection();
}
}
}
No comments:
New comments are not allowed.