Hi,
How do I programmatically add a DropDownList into a Panel or PlaceHolder?
I used:-
DropDownList ddlSite = new DropDownList();
panelSite.Controls.Add(ddlSite);
The problem with this is that two DropDownList will appear in the Panel/PlaceHolder. And then I tried adding Attributes of onselectedindexchanged but seems like it doesn't work
ddlSite.Attributes["id"] = "ddlSite";
ddlSite.Attributes["runat"] = "server";
ddlSite.Attributes["onselectedindexchanged"] = "siteChange";
Thanks
Chuair
How do I programmatically add a DropDownList into a Panel or PlaceHolder?
I used:-
DropDownList ddlSite = new DropDownList();
panelSite.Controls.Add(ddlSite);
The problem with this is that two DropDownList will appear in the Panel/PlaceHolder. And then I tried adding Attributes of onselectedindexchanged but seems like it doesn't work
ddlSite.Attributes["id"] = "ddlSite";
ddlSite.Attributes["runat"] = "server";
ddlSite.Attributes["onselectedindexchanged"] = "siteChange";
Thanks
Chuair