In this code I have cleared all Textbox of my Active Tab Panel in the AJAX Tabcontainer control.
Code:-
AjaxControlToolkit.TabContainer container = (AjaxControlToolkit.TabContainer)TabContainer1;
foreach (object obj in container.ActiveTab.Controls)
{
if (obj is Control)
{
Control c = (Control)obj;
if (c is System.Web.UI.WebControls.Table)
{
Table tbl = c as Table;
foreach (object rw in tbl.Rows)
{
TableRow tbr = rw as TableRow;
foreach (object cl in tbr.Cells)
{
TableCell tcl = cl as TableCell;
foreach (object ctl in tcl.Controls)
{
if (ctl is System.Web.UI.WebControls.TextBox)
{
TextBox txt = ctl as TextBox;
txt.Text = "";
}
}
}
}
}
}
}
}
}
No comments:
Post a Comment