Reset Text Boxes in ASP.Net - Part 2
In my last Article " Reset Text Boxes in ASP.Net " I suggested a way to clear all text boxes in ASP.NET form(C#). But in real time situation life is not that easy and we are faced with more than just text boxes. So this time I'll show how to clear some of the very comman controls on a ASP.NET form. C# private void ClearForm(Control parent) { foreach (Control ctl in parent.Controls) { if (ctl.Controls.Count > 0) { ResetFormControlValues(ctl); } else { switch(ctl.GetType().ToString()) { case "System.Web.UI.WebControls.TextBox": ((TextBox)ctl).Text = ""; break; case "System.Web.UI.WebControls.CheckBox": ((CheckBox)ctl).Checked = false; break; case "System.Web...