单击搜索后显示文本框的下拉列表(Show dropdownlist for a textbox after clicking search)

编程入门 行业动态 更新时间:2024-10-27 02:21:00
单击搜索后显示文本框的下拉列表(Show dropdownlist for a textbox after clicking search)

我有一个简单的asp.net文本框和旁边的搜索按钮。 用户可以在文本框中编写一些文本,然后单击搜索。 单击搜索按钮时,我需要执行数据检索并在文本框下方的下拉列表中显示结果。

请查看下面的图片以获取插图:

到目前为止,我将结果显示在一个单独的GridView中,如何将其显示为如下所示的下拉列表?

I have a simple asp.net Textbox and a search button next to it. The user would write some text in the Textbox and then click search. When the search button is clicked, I need to perform data retrieval and display the results in a dropdownlist below the textbox.

Please check the image below for illustration:

So far I display the results in a separate GridView, how can I display it as a dropdown as shown?

最满意答案

如果您已经知道数据,可以使用此属性:

https://msdn.microsoft.com/fr-fr/library/system.windows.forms.textbox.autocompletemode%28v=vs.110%29.aspx

或者您可以在数据库中搜索并使用JQuery自动完成和Ajax调用显示结果。

使用ASP.NET的JQuery UI自动完成的有效方法

May you can use this property if you already knows the datas :

https://msdn.microsoft.com/fr-fr/library/system.windows.forms.textbox.autocompletemode%28v=vs.110%29.aspx

Or you can search in database and display result with a JQuery autocomplete and Ajax Call.

Efficient way of using JQuery UI Autocomplete with ASP.NET

更多推荐

本文发布于:2023-07-15 19:11:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1117677.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:单击   文本框   列表   Show   search

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!