C#中的组合框编码 [英] Combo Box coding in C#

查看:94
本文介绍了C#中的组合框编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


在我的用户名Usercreation页面上,我设计了Combobox.当我在组合框中键入"a"时,它应该显示列表,且所有名称均以"a"开头.

问候
Balamurugan

Hi,
In my Usercreation page for username i have designed Combobox.When i''m typing "a" in combobox means it should show the list which is having all the name starts with "a".

Regards
Balamurugan

推荐答案

1.为comboBox创建TextChanged事件
2.在查询的where子句中将输入文本作为参数传递
3.使用带有该参数的like运算符获取结果并将其绑定到comboBox


例如:
1. Create TextChanged Event for comboBox
2. Pass input text as parameter in where clause of the query
3. use the like operator with that parameter to get the the result and bind this to comboBox


for example:
Select * from tbl_name
where column_name like ''%''+@Param+''%''


这篇关于C#中的组合框编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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