-
1
- #1
I've found a strange bug on the DropDownList. If you use two items with the same value and select the second one, after the post back, the first is selected.
The state property should save the SelectedIndex property, but instead, it saves the SelectedItem.Value.
I had a list with the following data:
Index Value Text
===== ===== ======
0 '0' ''
1 'Home' 'Myhome'
2 'Work' 'MyWork'
3 'Home' 'OtherHome'
4 'Room' 'MyRoom'
If the selectedindex is 3 before the postback, after that is 1.
My advice is: Try never use repeated values.
This is just a warning, just in case strange things happen with your DropDownList.
NetAngel
The state property should save the SelectedIndex property, but instead, it saves the SelectedItem.Value.
I had a list with the following data:
Index Value Text
===== ===== ======
0 '0' ''
1 'Home' 'Myhome'
2 'Work' 'MyWork'
3 'Home' 'OtherHome'
4 'Room' 'MyRoom'
If the selectedindex is 3 before the postback, after that is 1.
My advice is: Try never use repeated values.
This is just a warning, just in case strange things happen with your DropDownList.
NetAngel