DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 09 Aug 2007 10:48:27 -0700,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    unknown


AppendDataBoundItems   
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:DropDownList ID="DropDownList6" runat="server"
DataSourceID="SqlDataSource3" DataTextField="Username"
DataValueField="Username" SelectedValue='<%# Bind("ModUser") %>'
AppendDataBoundItems="True">
    <asp:ListItem Value="" Text="">Select Username</asp:ListItem>
</asp:DropDownList>

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
Date:Thu, 09 Aug 2007 10:48:27 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us