Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dropdownlist returns incorrect item 1

Status
Not open for further replies.

rambleon

Programmer
Mar 6, 2004
130
IL
What could be the reason that only the first 2 items in a dropdownlist work correctly. Clicking any other items either returns the 2nd item (SelectedIndex(1)) or nothing.
 
Do you have items in the list with the same "value"? The value must be unique for each item in the dropdownlist.

Jim
 
Thanks Jim, I've been breaking my head for a week over this, so obvious but you're the first to point it out.
Actualy seems more logical that the textfield values should
be unique.
 
Actually there was a post on here yesterday that had the same issue. You will not get an error, but the dropdown will just now work properly. I never noticed it until I was trying to help with that post. It probably should warn you in some way, at least at run time.

Glad it is working for you..
Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top