Hi,
I have a drop down list on a form view which are both bound to different data sources.
When trying to run the program I am getting 'ddlFieldName' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value.
I think it is because the field associated with the drop down list contains a null value which isnt in the referencing table. I have tried to work round this by adding an empty item in the list but it doesnt seem to be working:
<asp:DropDownList ID="ddlAgency" runat="server"
DataSourceID="dsAgency" DataTextField="Agency"
DataValueField="AgencyID" SelectedValue='<%# Bind("Agency") %>' >
<asp:ListItem></asp:ListItem></asp:DropDownList>
Can anyone suggest a way round this?
Thanks
anD666