Click here to Skip to main content
15,937,602 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi...

how to select a item from listbox to textbox by selecting a row/item from a listbox?
for web application
Posted
Updated 2-Dec-11 1:21am
v2
Comments
lukeer 2-Dec-11 4:50am    
What's wrong whith the solution Manoj K Bhoir gave you when you asked that the first time here[^]?

Please use the original thread. Improve your question there using the "Improve question" link there.
Mukunda Raj 2-Dec-11 4:59am    
i`m using web application,please provide specific code?

What about (if you are using C#):
C#
MyTextBox.Text = MyListBox.SelectedItem.Text;
 
Share this answer
 
Comments
Mukunda Raj 2-Dec-11 5:30am    
This code will work with button_click event.but i want directly by selecting items in listbox.
Pallini`s code :

MyTextBox.Text = MyListBox.SelectedItem.Text;

This code will work with listbox enabled "Enable AutoPostBack"
 
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