Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi sir/Ma'am


I am using asp.net with vb as language.
Sir i want to add item text in list box on the text change event of text box.
I am already done it in vb.net but with asp.net the working is not done on text change event .

Please help me regarding this.




i want to add such like when i write anku in text box then all the name having string anku populate in the listbox on textbox text change the values automatically change in the list box according to text box string

I do it in vb.net but in asp.net on doing text change the list box values not effected
Posted
Updated 22-Feb-13 16:20pm
v3
Comments
Sergey Alexandrovich Kryukov 22-Feb-13 22:12pm    
List box or just item? Why? Do you understand that you are going as many controls as characters? And what did you try so far? It sounds pretty trivial...
—SA
ankur789 22-Feb-13 22:19pm    
i want to add such like when i write anku in text box then all the name having string anku populate in the listbox on textbox text change the values automatically change in the list box according to text box string

1 solution

Step 1:
Write TextChanged="FunNsme" in your .aspx page in respective Text Control.

FunName :- Function name which you will make in Step 2.

Step 2:
Make a text Change event on aspx.vb by selecting control and event from top of the page.

Add statements to your function.

Step 3:
Add the Following code in your Page load event f .aspx.vb

txtName.Attributes.Add("TextChanged")

txtName is a Name of your TextBox.
 
Share this answer
 
Comments
ankur789 23-Feb-13 2:55am    
no sir problem is that when i click enter key then values add in the list box .after text change the list box is not populated on the basis of text change of textbox

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