int block = Convert.ToInt32(Label4.Text); for (int i = 1; i <= block; i++) { Panel rpt_panel = new Panel(); rpt_panel.ID = "pnlblock" + i.ToString(); rpt_panel.Visible = true; }
new
Panel rpt_panel = Page.FindControl("pnlblock" + i.ToString());
foreach (object ctl_loopVariable in this.Controls) { ctl = ctl_loopVariable; if (ctl is panel) { ctl.visible = true; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)