使用数据库中已有的结果创建搜索框 [英] Creating a search box using results already on database

查看:41
本文介绍了使用数据库中已有的结果创建搜索框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我正在VB.net中创建一个asp.net应用程序,我有一个数据库连接到它.该数据库包含许多信息,例如用户,供应商等.目前,我有一个下拉菜单,该菜单太长了,以至于无法找到想要的供应商.现在,我想创建一个搜索框,以便当我想要一个特定的供应商时(我已经在数据库上获得了所有供应商的详细信息,例如地址和联系方式),我想开始输入供应商名称,并希望它查找然后数据库开始向我提供与我正在键入的内容相匹配的数据.

例如,当您在Google上进行搜索时,通常它将开始为您提供与您键入的内容相匹配的内容或与您已经搜索的内容相似的内容.我想知道是否有人知道如何在VB.net和MySQL中这样做会有所帮助.


预先感谢!

Hi there,

I am creating an asp.net application in VB.net I have a database connected to it. The database contains a lot of information for example users, vendors etc. Currently I have a dropdown menu which is just too long to be doing through it just to find the vendor you want. Now I want to create a search box so that when I want to get a specific vendor (I already have all the vendors details on the database such as address and contacts) I want to start typing the vendors name and I want it to look in the database then start giving me matching data to what I m typing to what already exists.

For example, when you do a search on google, normally it will start giving you matches to what you typing in or something similar to what you have already searched for. I wonder if anyone knows how to do it in VB.net and MySQL that would be helpful.


Thanks in advance!

推荐答案

jQuery有很多可用于执行自动完成搜索的插件.只需在Google中搜索jQuery自动完成功能,或者您就可以在 http://jqueryui.com/demos/autocomplete/上使用jQuery自动完成功能[ ^ ]
jQuery has a lot of plug-ins available for doing autocomplete searches. Just search google for jQuery autocomplete or you can use the jQuery autocomplete at http://jqueryui.com/demos/autocomplete/[^]


可以使用Jquery插件为此.

您可以使用
Jquery plugins available for this.

you can use


.autocomplete()搜索记录.
链接: http://jqueryui.com/demos/autocomplete/ http://www.devbridge.com/projects/autocomplete/jquery/ http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/AutoComplete/AutoComplete.aspx
.autocomplete() to searching records.
link : http://jqueryui.com/demos/autocomplete/

AJAX autocomplete for JQUERY
link : http://www.devbridge.com/projects/autocomplete/jquery/

another way is Autocomplete Extender of AJAX.

link : http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/AutoComplete/AutoComplete.aspx


这篇关于使用数据库中已有的结果创建搜索框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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