Hi,
I have a question about collapse panel..
I have a placeholder and I add more than one headerpanel, contentpanel, collapsiblepanel dynamically.. Here is my code :
CollapsiblePanelExtender cpe = new CollapsiblePanelExtender();
Panel pnlheader,pnlcontent;
Label lblcontent,lblheader; Button btn;
for (int i = 0; i < 10; i++)
{
///// PANEL HEADER VE ICERIGI //////////
pnlheader = new Panel();
pnlheader.ID = "PanelHeader" + i;
pnlheader.BackColor = System.Drawing.Color.Blue;
lblheader = new Label();
lblheader.ID = "LabelHeader" + i.ToString();
lblheader.Text = (i + 1) + ". Header";
pnlheader.Controls.Add(lblheader);
/////////PANEL CONTENT VE ICERIGI //////////
pnlcontent = new Panel();
pnlcontent.ID = "PanelContent" + i;
pnlcontent.BackColor = System.Drawing.Color.DarkRed;
lblcontent = new Label();
lblcontent.ID = "LabelContent" + i.ToString();
lblcontent.Text = "<table><tr><td border=\"1\">DENEMEE</td></tr></table>";
btn = new Button();
btn.ID = "Button" + i.ToString();
btn.Text = "Deneme.Button";
pnlcontent.Controls.Add(lblcontent);
pnlcontent.Controls.Add(btn);
///////// COLLAPSEPANEL ICERIGI///////
cpe = new CollapsiblePanelExtender();
cpe.ID = "CollapsePanel" + i;
cpe.TargetControlID = "PanelContent" + i;
cpe.ExpandControlID = "PanelHeader" + i;
cpe.CollapseControlID = "PanelHeader" + i;
PlaceHolder2.Controls.Add(pnlheader);
PlaceHolder2.Controls.Add(pnlcontent);
PlaceHolder2.Controls.Add(cpe);
}
How can I understand which panel expanded..
it is very important, please help..