![]() |
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. |
Re: Is there any way to have a dropdown list with non-unique values?
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 -- <johngilmer@yahoo.com> a écrit dans le message de news:1115906298.398206.309630@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. > |
| All times are GMT. The time now is 12:07 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.