Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9243289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:46:43+00:00 2026-06-18T08:46:43+00:00

I am having problems with asp.net binding to a dropdownlist and I have no

  • 0

I am having problems with asp.net binding to a dropdownlist and I have no clue on how to debug. I checked out the other questions about this on stack but nothing has helped. As far as I can see the “name” it should select is in the list.

<asp:DropDownList ID="dd1" runat="server" DataSourceID="ADataSource" DataTextField="Name" 
                                                    DataValueField="Name" SelectedValue='<%# Bind("Name") %>'   Width="255" 
                                                    AppendDataBoundItems="true" TabIndex="3"  Font-Size="small"  EnableViewState="true"    >
                                             <asp:ListItem Text="Select"  Value="" />
                                           </asp:DropDownList>

Following is the error

System.ArgumentOutOfRangeException was unhandled by user code
Message=’dd1′ has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value
Source=System.Web
ParamName=value
StackTrace:
at System.Web.UI.WebControls.ListControl.PerformDataBinding(IEnumerable
dataSource)
at System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e)
at System.Web.UI.WebControls.ListControl.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBind()
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBind()
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBind()
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.WebControls.DetailsView.CreateChildControls(IEnumerable
dataSource, Boolean dataBinding)
at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable
data)
at System.Web.UI.WebControls.DetailsView.PerformDataBinding(IEnumerable
data)
at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable
data)
at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments
arguments, DataSourceViewSelectCallback callback)
at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
at System.Web.UI.WebControls.DetailsView.DataBind()
at storeUpdate.GvStoresSelect_SelectedIndexChanged(Object sender, EventArgs e) in line 233
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.WebControls.GridView.OnSelectedIndexChanged(EventArgs e)
at System.Web.UI.WebControls.GridView.HandleSelect(Int32 rowIndex)
at System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup)
at System.Web.UI.WebControls.GridView.OnBubbleEvent(Object source, EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at System.Web.UI.WebControls.GridViewRow.OnBubbleEvent(Object source,
EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
eventArgument)
at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException:

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:46:45+00:00Added an answer on June 18, 2026 at 8:46 am

    The value coming from <%# Bind("Name") %>, which is passed to the SelectedValue property, does not match an item in its collection. Most likely causes:

    • DropDownList has no items because the evaluation happens before the list gets bound
    • The list is bound but is missing this particular value
    • The value returned could be null
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know similar questions have been asked regarding complex model binding in ASP.NET MVC,
I have an ASP.NET MVC2 application in development and I am having problems rendering
I'm having problems with setting validations date format Chrome in asp.net mvc, for other
I am having problems using a ASP.NET Regular Expression Validator on text boxes. This
Im doing a page in .asp and im having this problem ... I have
i am having problems with an asp.net c# site whereby i am setting a
I'm having problems with my ASP.NET web forms system. It worked on our test
I am having problems with code written in ASP.NET with some javascript, doing a
I am new to Asp.net MVC and am having problems with the following code.
I am actually migrating websites to ASP.NET 4.0, having problems with the new rendering

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.