Posted on: 3/1/2011 6:52:05 AM | Views : 274

Hi Guys,
I have some code which dynamically generates a number of drop down lists to provide the user with different options. The items in these drop downlists contain a value which is a unique id for that particular combination of options and a text component which just plain text but not neccessarily unique. I then have assigned a handler to these dropdownlists which is called on selected index changed to perform the relevant actions based on what options are selected. The problem is to make the system perform the correct action I need the unique ID from selectedValue of the drop down box but when it posts back it appears the selectedValue has been replaced to match the text of the item.
For example: Say I have a dropdownlist with the options red, green, blue and the values 00, 01, 02 respectively. If I select green I need it return the value 01 however it instead returns "green". And no I can't use selected index because the IDs don't necessarily start from 0 for ...

Go to the complete details ...