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 38467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:42:45+00:00 2026-05-10T14:42:45+00:00

I have a asp.net 2.0 web site with numerous asp:DropDownList controls. The DropDownList control

  • 0

I have a asp.net 2.0 web site with numerous asp:DropDownList controls. The DropDownList control contains the standard info city, state, county etc… info. In addition to the standard codes the site also has custom codes that the users can configure themselves. For example a animal dropdown may contain the values Dog, Cat, Fish, ect…

I am popluating the DropDownList from a SQL 2005 table that I created e.g. tblCodes

Everything works great and users are able to add orders using the numerous DropDownList controls to choose items from the list.

The problem occurrs if a user wants to change one of their custom dropdowns. For example a user would like to change the verbage on a animal type control from Dog to K9. This is where the problem starts.

For all new orders the drop down works fine. When the user retrieved an old order I get the following error in the C# codebehind ”DropDownList1′ has a SelectedValue which is invalid because it does not exist in the list of items.’

What’s happening is the old order has a database field value of Dog and the DropDownList no longer has Dog in its list since the user changed it to K9.

Any ideas on a workaround?
Is there a way to make the asp:DropDownList accept items not seeded in its list? Is there another control I could use?

  • 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-10T14:42:46+00:00Added an answer on May 10, 2026 at 2:42 pm

    I’m not sure it’s the same issue, but I had a similar sounding issue with trying to bind a DropDownList that I wanted to contain in a GridView. When I looked around I found a lot of people asking similar questions, but no robust solutions. I did read conflicting reports about whether you could intercept databinding, etc events. I tried most of them but I couldn’f find a way of intercepting or pre-empting the error.

    I ended up creating a subclass of the ddl, intercepting the error from there hacking a fix.

    Not tidy but it worked for my needs. I put the code up on my blog in case it’s of help. link text

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

Sidebar

Ask A Question

Stats

  • Questions 68k
  • Answers 68k
  • 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 Memory validator would be ideal for you. http://www.softwareverify.com/cpp/memory/index.html May 11, 2026 at 12:21 pm
  • added an answer An important point that I think people here are missing… May 11, 2026 at 12:21 pm
  • added an answer I agree that this is pretty hard. I implemented those… May 11, 2026 at 12:21 pm

Related Questions

I have a ASP.Net 2.0 website that is currently using a custom MembershipProvider and
In an ASP.NET 2.0 website, I have a string representing some well-formed XML. I
I have a site that I am currently working on in ASP.NET 2.0 using
Like many others on this site I am considering a move to ASP.NET MVC

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.