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

  • SEARCH
  • Home
  • 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 60319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:08:36+00:00 2026-05-10T18:08:36+00:00

Exception is: ‘Country’ has a SelectedValue which is invalid because it does not exist

  • 0

Exception is: ‘Country’ has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value

UserService.DsUserAttributes dsCountry = us_service.GetUserAttributeDropDown(systemId, 'Country'); Country.DataSource = dsCountry.tblDropDownValues; Country.DataTextField = 'AttrValue'; Country.DataValueField = 'Id'; Country.DataBind(); 

The values held within dsCountry.tblDropDownValues are:

Id                                      AttrValue       AttrName aefa28e0-a118-11dd-ad8b-080c210c9a66    PLEASE SELECT   Country 213a743e-ea0b-419c-bd44-03b1c35241b3    USA         Country eefa1387-8dc0-11d8-975f-13da67a41a5d    CANADA          Country 
  • 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. 2026-05-10T18:08:37+00:00Added an answer on May 10, 2026 at 6:08 pm

    Every time I got this error it was because the keys I was matching on to bind my data didn’t match.

    The lines you showed may not be the problem. Look into when you are possibly loading a record from another table and binding their values into the dropdown list.

    For example, if you have a dropdown list on your page that contains all your country names with country Ids as Value-behinds These values are all stored in a table CountryTbl. You also have a grid on the page where a user can select which record from another table they want to edit. Let’s say this record contains Information like Name, Phone #, and Country, and its all stored in another table UserTbl. When the form is attempting to bind its data from UserTbl, it is trying to set your Country DropDownList equal to a bound value from UserTbl.

    But what can happen, and has happened to me many times, is that you have bad data in your UserTbl like a Country that doesn’t exist anymore, or another value in its Country field that just doesn’t match any of your values in the Country Dropdown.

    Look into your database tables and see if you have any CountryIds in your ‘UserTbl’ that don’t match any of the ContryIds in your ‘CountryTbl’.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 67k
  • Answers 67k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Yes, you wil need to include your code on each… May 11, 2026 at 11:56 am
  • added an answer Does this sounds like the same problem? Sorry as it's… May 11, 2026 at 11:56 am
  • added an answer You can't circumvent latency by reducing size. Just make sure… May 11, 2026 at 11:56 am

Related Questions

Exception is: 'Country' has a SelectedValue which is invalid because it does not exist
This is about when a .NET remoting exception is thrown. If you take a
The following exception is thrown: Error Message: Microsoft.SqlServer.Management.Smo.FailedOperationException: Drop failed for Database '4d982a46-58cb-4ddb-8999-28bd5bb900c7'. --->
We get an abort when a C++ exception is thrown when running code compiled
I'm using watermark extenders on textboxes and an exception is being thrown from the
In a destructor, is there a way to determine if an exception is currently
I'm trying to put a Message back into an MSMQ when an exception is
From what I understand of the SDK, this exception is raised when the bindings
Question: Is exception handling in Java actually slow? Conventional wisdom, as well as a
How a user exception class is created from standard exception? Addressing below cases Say

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.