Click here to Skip to main content
15,914,221 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,
I am new to this forum...i have query that while using dropdown list C# .net we give index of selected item but if we select the item manually then how can we get the index of that item??i am getting the previously selected index..as it does not change the value of currently selected item...pls reply ASAP....thanks in advance....
Posted
Comments
Timberbird 16-Nov-11 8:38am    
In selectedIndexchanged event you should have index of currently selected item. Check SelectedIndex property - does it point to currently selected item?

1 solution

The SelectedItemIndex property will be the index of the currently selected item
 
Share this answer
 
Comments
Microquery 16-Nov-11 9:21am    
But it is not giving the value of currently selected Index...
[no name] 16-Nov-11 9:30am    
Do you want the value or the index? These are two different things. Please clarify
Microquery 17-Nov-11 1:25am    
I am concerned about selectedindex....if I change the item from dropdownlist it should change the selectedindex but it is giving me the the same index...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900