vicky k

vicky k

  • NA
  • 4
  • 3.2k

How to access the button on dynamic panel

Dec 21 2011 1:16 PM
Hi..

Now i have created a dynamic panels to add one placeholder,here every panels contains one button...
when i am going to click the button from panels then add some dynamic panels inside that particular panel(I need about Nested dynamic panel concept),how can i acheive this how we find the button events in dynamic panel..




Here i attached sample code part:

pnlChilds.ID =

pnlChilds.Height = 400;

pnlChilds.Width = 400;

pnlChilds.ScrollBars =

pnlChilds.BorderStyle =

btnAddChildPanels.ID =

btnAddChildPanels.Text =


"childPanels" + strpnl;ScrollBars.Vertical;BorderStyle.Outset;"btnAddChildPanels" + strbtn;"AddChildPanels" + strbtn;//btnAddChildPanels.Click += new EventHandler(btnAddChildPanels_click);

btnAddChildPanels.Height = 30;

btnAddChildPanels.Width = 100;

pnlChilds.Controls.Add(btnAddChildPanels);

DynamicPanels._Dynamicdd(pnlChilds);


btn.Command +=

Button btn = (Button)pnlChilds.FindControl("btnAddChildPanels" + strbtn);new System.Web.UI.WebControls.CommandEventHandler(Onclick);