473,397 Members | 2,084 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

dropdown puzzler

I'm thinking this problem is not specific to ASP.NET but anyway:

I have a dropdown that I populate when the page loads, and I have values
that are different from the
text that displays, so the resulting html looks like:

<option value="BUF">120 </option>
<option value="ALB">126 </option>
<option value="ALB">127 </option>
<option value="ROC">149 </option>

Now, if I've selected the item containing '127' in the dropdown, when the
page posts back,
the item '126' displays.
The pattern is that the first item with the value of the selected item
('ALB' in this case) displays on postback.
If I select '149', then that will display at postback, since it's the first
item with a 'ROC'
as a value.

Can anybody explain? A solution would be welcome as well.

Nov 18 '05 #1
1 950
All that gets passed back on submit from a form like that is ALB. The Text
is not passed back by the browser. The only way is to make sure your options
are unique values.
"Jim Corey" <jc****@nospam.charter.net> wrote in message
news:10*************@corp.supernews.com...
I'm thinking this problem is not specific to ASP.NET but anyway:

I have a dropdown that I populate when the page loads, and I have values
that are different from the
text that displays, so the resulting html looks like:

<option value="BUF">120 </option>
<option value="ALB">126 </option>
<option value="ALB">127 </option>
<option value="ROC">149 </option>

Now, if I've selected the item containing '127' in the dropdown, when the
page posts back,
the item '126' displays.
The pattern is that the first item with the value of the selected item
('ALB' in this case) displays on postback.
If I select '149', then that will display at postback, since it's the first item with a 'ROC'
as a value.

Can anybody explain? A solution would be welcome as well.

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Joseph Barron | last post by:
Here is a SIMPLE problem that I'm trying to solve. It works in Netscape 6.2, but IE6 gives ""No such interface supported." Below are page1.htm and page2.htm . In page1.htm, there are two...
0
by: Toonman | last post by:
I have a webpage with a <form> consisting of a large table grid of dropdown lists used to make changes in a database. Some of these dropdown lists have the same value. I'm trying to make it so...
6
by: Rey | last post by:
Howdy, all. Appreciate your help. Have a one to many relation between a client and visit table. In the visit subform, I have a visittype and counselor field which are comboboxes. If I set...
13
by: melih.onvural | last post by:
Group, I'm having a tough time understanding some of the previous posts on this topic so I wanted to write what I've tried and hope that you can help me troubleshoot. I have a dropdown populated...
2
by: 23s | last post by:
I have a dropdown bound to a dataview. The binding assigns the dropdown with a SelectedIndex of 0. There is a msgbox in the SelectedIndexChanged event that displays the SelectedIndex property....
5
by: Gil | last post by:
Is there a way to tell if a combbox is in dropdown mode. I tried and if statement combobox.dropdown = true but i get an error. dropwndown function doesnt store if its true or false what i am...
3
by: devNorway | last post by:
I have been struggling with a problem for days now, and searched for related problems and solutions but had no luck. I have two dropdown listboxes where the first is populated in page load and...
0
by: Kay | last post by:
Hello, I have written my own custom control and I want one of its properties to display as a dropdown list when clicked, so the user can select from the list, it would be similar to the asp...
0
by: Kay O'Keeffe | last post by:
Hello, I have written my own custom control and I want one of its properties to display as a dropdown list when clicked, so the user can select from the list, it would be similar to the asp...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.