I wish to allow the user to determine how many controls to generate based on their selection in the dropdownlist. My issue is that the value selected from the dropdownlist is available only after onselectedindexchanged is triggered. So I getting the value after the screen is rendered. Is there a way to obtain the selected value before onselectedindexchanged is triggered. The current code is generating the dynamic controls but only after I select a different item in the dropdownlist. Seems I need to get the dropdown value on the client side before postback. Any HELP would be greatly appreciated!!! Here is my code snippets:
ASPX:
ASPX.CS
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
CreateChildControls();
}
protected void DDL1_SelectedIndexChanged(object sender, EventArgs e)
{
myCount = DDL1.SelectedIndex; // myCount represents the # of rows of dynamic textboxes
}