Click here to Skip to main content
15,876,993 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please tell me the fastest way to create autocomplete with textbox in I used Web services with textboxes but it is not too fast it takes some time to fetch data from Database that will create problem. Please tell me the efficient way.
Ciumac Sergiu 8-Jun-11 4:23am    
Reading from database is expensive operation. You might try caching the most frequently read items on the application level.
Cache["key"] = "value";
Anyway you should act carefully with the cache as storing big data chunks in it is not a good idea.

Well, using a webservice makes sense. If it's not fast, your server is slow, your connection is slow, or your code sucks. There's an autocomplete control in the ASP.NET AJAX library, why not try that ?
Share this answer
walterhevedeich 8-Jun-11 20:43pm    
Countered with a 5. Although the statement is frank and the word "sucks" might have been misunderstood, I think the advice was perfect.
Have a look at this article. It does just what you need AutComplete Control[^]

Hope this helps
Share this answer
If the data will be coming from the database, web services might be an efficient solution for this problem. One reason why it takes time to load may be due to many factors, like the web server, the database, or even the code and SQL scripts that fetches data. You might also want to consider AJAX as your solution. Have a look at these articles about autocomplete textbox using AJAX.

AJAX AutoComplete/AutoSuggest TextBox[^]

AJAX WAS Here - Part 3 : Auto Complete TextBox[^]
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