如何从AutocompleteTextBox中找到SelectedValue。 [英] How to find the SelectedValue from the AutocompleteTextBox.

查看:135
本文介绍了如何从AutocompleteTextBox中找到SelectedValue。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从AutocompleteTextBox获取SelectedValue?



请给出相同的代码示例。

解决方案

对于AutocompleteTextBox,所选文本是选定的值。如果要获取所选文本的Id,则必须从数据库或内存数据(如会话或视图状态)中检索所选文本的Id。



我的建议:



如果你想用AutoComplteTextBox获得选定的值,你可以使用JQuery DropdownList这将允许您根据用户输入过滤值。



以下是JQuery的一个很好的例子:



使用选择的jQuery插件自定义ASP.NET DropdownList控件 [ ^ ]

How to get the SelectedValue from AutocompleteTextBox?

Please give some code sample for the same.

解决方案

For AutocompleteTextBox selected text is the selected value. And If you want to get the Id of the selected text then you have to retrieve Id from Database or in memory data (like session or viewstate) for selected text.

My Suggestion :

If you want to get selected value with AutoComplteTextBox, You may use JQuery DropdownList which will allow you to filter the values based on user inputes.

Below is the good example of JQuery :

Custom ASP.NET DropdownList Control Using Chosen jQuery Plugin[^]


这篇关于如何从AutocompleteTextBox中找到SelectedValue。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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