Use of AutoCompleteSource in C#.net

Posted by Naraayanan under C# on 6/26/2012 | Points: 10 | Views : 1173 | Status : [Member] | Replies : 2
Hi,
How to use AutoCompleteSource in C#.net at Run time.
It is only for Text Box and ComboBox Controls.But How to add a data into "Customsource " option in the AutoCompleteSource.Please give an Example.

Note: user will update a TextBox or ComboBox at runtime and it will display when user type a first letter in the Controls.

For Example:
Control: TextBox
Set Properties:
AutoCompleteMode:SuggestAppend.
AutoCompleteCustomSource: "HP","Intel","IBM".
AutoCompleteSource:CustomSource.

Now , I run my Application and I typed in the TextBox(like this "H") Starting "H" words displayed in the ListBox.
MY Query:
"HP Laser Jet" typed in the Text Box and Press "Enter" Key. It did not display why? I want to display HP and HP Laser jet in the list box.Please How to achieve this?

Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/



Responses

Posted by: Ranjeet_8 on: 6/29/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
Hi,

chek this url, you will find how to use autocamplete with Ajax Control

http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/autocomplete/autocomplete.aspx




Naraayanan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Johnbhatt on: 6/29/2012 [Member] Starter | Points: 25

Up
0
Down
I have earlier wrote a code in code section.
Find at
http://www.dotnetfunda.com/codes/code2722-autocompleteextender-in-textbox-from-sql-table.aspx


John Bhatt
Glad to Know, Free to Share.....
http://www.johnbhatt.com

Naraayanan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response