自动完成在asp.net Web表单中搜索多个文本框

问题描述:

我想在单个网络表单中实现多个自动完成搜索文本框或组合框,就像在我的屏幕截图中一样。

任何人都可以通过使用Web服务或不使用Web服务来帮助我实现这一点。 web或Asp.net Ajax工具包服务。

I would like to implement muliple auto-complete search textbox or combobox in a single web form just like in my screen shot.
Can any one help me to implement this by using web service or without web or Asp.net Ajax toolkit service.

当然 - 这很简单。





所有自动填充文本框都是与数据列表相关联的文本框:





Sure - this is totally easy.


All an autocomplete textbox is, is a textbox associated with a datalist:


<input type="text" list="mydatalist" />
<datalist id="mydatalist">
  <option>abcd</option>
  <option>abce</option>
  <option>abcf</option>
  <option>abcg</option>
</datalist>





你可以从一个空白的datalist并使用javascript向其添加项目。从ajax网络服务电话获取这些项目。



如果您需要任何这些特定点的帮助,请先搜索它们。他们在这里和谷歌都非常有资源。



希望有所帮助^ _ ^



Andy



You can start with a blank datalist and use javascript to add items to it. Get these items from an ajax web service call.

If you need help with any of these specific points, search for them first. They are all very well resourced here and all over the googles.

Hope that helps ^_^

Andy


请参考以下链接获取样本。



http://www.aspdotnet-suresh.com/2012/ 08 / using-jquery-autocomplete-with-aspnet.html [^]



http://www.encodedna.com/2013/04/autocomplete-textbox- using-jquery.htm
Please refer below links for sample .

http://www.aspdotnet-suresh.com/2012/08/using-jquery-autocomplete-with-aspnet.html[^]

http://www.encodedna.com/2013/04/autocomplete-textbox-using-jquery.htm


请使用webservice来解决这个问题。

< asp:textbox id =txtlocationrunat =serverheight =25pxcssclass =input-mediumstyle =display:none; xmlns:asp =#unknown>

Please Use webservice for this problem.
<asp:textbox id="txtlocation" runat="server" height="25px" cssclass="input-medium " style="display:none;" xmlns:asp="#unknown">
<script>