使用文本框自动完成 [英] Autocomplete with textbox

查看:90
本文介绍了使用文本框自动完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请告诉我在asp.net中使用文本框创建自动完成的最快方法.我将Web服务与文本框一起使用,但是它并不太快,需要一些时间才能从数据库中获取数据,这会造成问题.请告诉我有效的方法.

Please tell me the fastest way to create autocomplete with textbox in asp.net. 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.

推荐答案

好吧,使用Web服务很有意义.如果不是很快,则服务器速度很慢,连接速度很慢,或者代码很烂. ASP.NET AJAX库中有一个自动完成控件,为什么不试试看呢?
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 ?


看看本文.它完全可以满足您的需求 AutComplete控件 [
Have a look at this article. It does just what you need AutComplete Control[^]

Hope this helps


如果数据将来自数据库,则Web服务可能是解决此问题的有效方法.花费时间进行加载的原因之一可能是由于多种因素造成的,例如Web服务器,数据库,甚至是获取数据的代码和SQL脚本.您可能还需要考虑将AJAX作为您的解决方案.看看这些有关使用AJAX自动完成文本框的文章.

AJAX自动完成/AutoSuggest文本框 [ AJAX在这里-第3部分:自动完成文本框 [
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[^]


这篇关于使用文本框自动完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆