D
dglennon20
I'm getting the error: 'DropDownList6' has a SelectedValue which is
invalid because it does not exist in the list of items.
Parameter name: value
I'm using a formview. My EditItemView page has a dropdown that is not
in the InsertItemView. It must start out with a value that does not
exist in the datasource. I've read many posts and I still can't get it
to work.
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:CubCorpCS %>"
SelectCommand="SELECT null as Username, '--Select--' as
EMail
Union All
SELECT Username, EMail FROM
VisionSEUserUsername ORDER BY Username">
</asp:SqlDataSource>
<asp
ropDownList ID="DropDownList6" runat="server"
DataSourceID="SqlDataSource3" DataTextField="Username"
DataValueField="Username" SelectedValue='<%# Bind("ModUser") %>'
AppendDataBoundItems="True">
<asp:ListItem Value="" Text="">Select Username</asp:ListItem>
</asp
ropDownList>
The insert page inserts the create user from a drop down just fine,
but the ModUser is a new dropdown on the edit page selecting existing
data. Seems pretty simple...
David
invalid because it does not exist in the list of items.
Parameter name: value
I'm using a formview. My EditItemView page has a dropdown that is not
in the InsertItemView. It must start out with a value that does not
exist in the datasource. I've read many posts and I still can't get it
to work.
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:CubCorpCS %>"
SelectCommand="SELECT null as Username, '--Select--' as
Union All
SELECT Username, EMail FROM
VisionSEUserUsername ORDER BY Username">
</asp:SqlDataSource>
<asp
DataSourceID="SqlDataSource3" DataTextField="Username"
DataValueField="Username" SelectedValue='<%# Bind("ModUser") %>'
AppendDataBoundItems="True">
<asp:ListItem Value="" Text="">Select Username</asp:ListItem>
</asp
The insert page inserts the create user from a drop down just fine,
but the ModUser is a new dropdown on the edit page selecting existing
data. Seems pretty simple...
David