473,400 Members | 2,145 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,400 software developers and data experts.

Is there any way to have a dropdown list with non-unique values?

I have a dropdown list where the text that the user sees is unique, but
the values behind the options in the list are not unique. So the
text/value pairs in the list might be:

a - 1
b - 2
c - 2

When I select the third option ("c") and postback, the server thinks
that the user actually selected the second option ("b") because it is
the first option with a value of 2. Is there any way to make this work
where it uses the text ("c") to identify which option is selected
instead of the value?
Thanks in advance.

Nov 19 '05 #1
1 1524
No, see the "value behind the list" as a unique identifier. Server side this
is ONLY this value that you get and you are then unable to know wether the
user selected b or c...

Looks like the logic you want is :
a - 1
b or c - 2

The user will then select the "b or c" line and server side we'll get the
value 2...

If you really want to distinguish wether the user select b or c, you'll have
to have a distinct "behind the list value" for those two entries...
Patrice

--

<jo********@yahoo.com> a écrit dans le message de
news:11**********************@z14g2000cwz.googlegr oups.com...
I have a dropdown list where the text that the user sees is unique, but
the values behind the options in the list are not unique. So the
text/value pairs in the list might be:

a - 1
b - 2
c - 2

When I select the third option ("c") and postback, the server thinks
that the user actually selected the second option ("b") because it is
the first option with a value of 2. Is there any way to make this work
where it uses the text ("c") to identify which option is selected
instead of the value?
Thanks in advance.

Nov 19 '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...
1
by: Dale Geffs | last post by:
I have a form with a combo box and when it (combo) gets focus I issue a .dropdown. Using A2K and SP1 everything works fine and the list drops down under the control as expected. If I use a PC with...
3
by: Dmitry Korolyov [MVP] | last post by:
Is that possible? In other words, I want a dropdown list (and other list-type controls) which appears in edit more of a templated column to be populated with data at the run time. An attempt to do so...
6
by: Mark | last post by:
I have two dropdown lists. Both have autopostback set to true. In both dropdowns, when you select an item from the list, it redirects to the Value property of the dropdown. Nothing fancy. ...
6
by: nishac | last post by:
Can anyone suggest me how to make my drop down menu work in IE7 too.Its working in other browsers.On mouse over the submenus should be displayed.Am attaching my css code hereby.Anyone please check...
1
by: awreese | last post by:
I've created a series of dropdown menus that work fine in Firefox, Safari, Camino, etc. but will not work at all in Windows IE. I'm presenting the whole file here hoping someone will come up with...
3
by: fish919 | last post by:
Hello All, I am creating a date base in access. I want to create a dropdown list box that is connected to another dropdown list box. You start with a dropdown list that has 5 choices and each of...
5
by: abhi3211 | last post by:
i am using java inside java script page. in that page i want to use two dropdown list. in first dropdown list i am getting data from ms-access database. in second dropdown list i want to get data...
3
by: =?Utf-8?B?QW5kcmV3?= | last post by:
Hello, friends, We use System.Windows.Forms.ComboBox in our c#.net 2005 app. We want to make the dropdown list wider than the comboBox's width. (Some items in the dropdown list have more...
5
by: =?Utf-8?B?Y2hlY2tyYWlzZXJAY29tbXVuaXR5Lm5vc3BhbQ== | last post by:
I have a VS 2008 ASP.NET webform that has a reportview tag on it, accessing an .RLDC report in local report. The columns for the report are essentially: Month Item #1 Item#2 Item#3 ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.