Click here to Skip to main content
16,016,204 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have dropdownlist item as follows

Dropdownlist item as follows
Ramesh
suresh

When i click the ramesh i want to display ramesh in listbox
Listbox as follows
Ramesh

for that i want to display dropdownlist selected value into listbox.


for that how can i do in asp.net using c#.
Posted

Hi Narasiman1,

Try this:

1. Make "AutoPostBack=True" of your dropdown list.
2. Fire "SelectedIndexChanged" event of your dropdown list.
3. Add the SelectedItem of the dropdown to listbox.


Hope this will work

Thanks
 
Share this answer
 
write your code under this event
C#
Dropdownlist1_SelectedIndexChanged() {

}


once see this video for list box example https://www.youtube.com/watch?v=QH_IYzklTuA[^]
 
Share this answer
 

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