I have a webForm which host a gridview and a formview. The formview is used for showing/editing a record which the user Select from the gridview.
In the formview Edit template I used DropDownList controls with
for enabling the user easier interface. A few of the DropDownList controls need to have a list of 100 items and I want to load the items from code behind and not from the aspx.
I tried to update the DDL's from FormView.Load, FormView.ModeChanging, FormView.PreRender but nothing I am getting an error like this:
'ddlFirstPlusOperandFromTextBox' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value
which I think is because the DDL's have no items.
How do I load the DropDownList controls with items BEFORE the form databinding occurs.
View Complete Post