Author: RMcBride | Posted on: 9/5/2009 7:25:48 PM | Views : 370

Hi all
I am building Birthday Date selector inside a FormView using DropDownLists where the days and years are built using code rather than as list items. However I want to bind the associated data to the various controls inside the Formview. The problem I am running up against is knowing when to create the DDLs. After they are created I can do the bind, as I am storing the SelectedItem value in a HiddenField along the way.
I have tried OnDataBinding, OnDataBound and OnItemCreated, but they all complain that the various objects don't yet exist. So far the only way I have gotten the elements to work is by coding them in an OnIndexChanging event with the MonthDDL. This means the lists are not created until the Month is selected. However this means I cannot bind to them if data already exists, as the other list item elements don't yet exist.
If anyone can suggest how I could build these dynamic DDL's, then bind to them after they are built, I would appreci ...

Go to the complete details ...