My setup is as follows: In the PageLoad event, I initialize a dropDownList as follows:
SONumList = new DropDownList();
SONumList.DataSource = SOList;
SONumList.DataBind();
SONumList.Height = new Unit("19px");
SONumList.SelectedIndexChanged += (ChooseSODropDown);
SONumList.AutoPostBack = true;
Panel1.Controls.Add(SONumList);
In the ChooseSODropDown event that fires when the SelectedIndex on SONumList is changed, I create another DropDownList called PNum:
PNumList = new DropDownList();
PNumList.DataSource = dataSource2;
PNumList.DataTextField = "Part";
PNumList.DataValueField = "Part";
PNumList.DataBind();
PNumList.Height = new Unit("19px");
PNumList.SelectedIndexChanged += ChoosePNumDropDown;
PNumList.AutoPostBack = true;
Panel1.Controls.Add(PNumList);
Although the PNum box itself displays properly and has the data appropriately bound, the ChoosePNumDropDown event never fires, even though the page does postback. I've tried a breakpoint at the beginning of the function and it doesn't fire at all.
Is there some reason why I would be unable to bind events to an object inside of another event firing?