I have placed a dropdown list in the edititemtemplat e of a formview control and followed specific MSDN instructions on how to bind the list source to a separate SQL lookup data source but have the formview bound to the main data source. If I set the selecteditem value to bind to the formview control I always get the following error:
'DropDownList2' has a SelectedValue which is invalid because it does not exist in the list of items.
This is my asp:
<asp:DropDownLi st ID="DropDownLis t2" runat="server" AutoPostBack="T rue"
DataSourceID="S qlDataSource2" DataTextField=" Type"
DataValueField= "Type"
selectedvalue=' <%# Bind("ServicePr oviderType") %>'>
</asp:DropDownLis t>
I have read over 50 posts on this and got nowhere - HELP!
'DropDownList2' has a SelectedValue which is invalid because it does not exist in the list of items.
This is my asp:
<asp:DropDownLi st ID="DropDownLis t2" runat="server" AutoPostBack="T rue"
DataSourceID="S qlDataSource2" DataTextField=" Type"
DataValueField= "Type"
selectedvalue=' <%# Bind("ServicePr oviderType") %>'>
</asp:DropDownLis t>
I have read over 50 posts on this and got nowhere - HELP!
Comment