C#列表框与SQL查询 [英] c# listbox with sql query

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

问题描述



我正在使用列表框显示数据库表中的区域名称.

我要从中选择多个项目,并在用于基于所选值搜索属性的查询中使用它.

Hi,

I am using listbox to display area names from the database table.

I want to select multiple items from that and using it in the query used to search the property based on the values selected.

推荐答案

现在我要选择多个项目,并在查询中使用它来基于所选的值搜索属性.
好的.前进!有什么阻止你的吗?具体问题?

您需要做的就是允许列表框中的多项选择.在页面提交上,获取选定的项目,并基于查询中的项目,在数据库上执行并获得显示在显示屏上的结果(在网格或任何其他适当的控件中).

尝试!
now i want to select multiple items from that and using it in the query used to search the property based on the values selected.
Good. Go ahead! Anything stopping you? Specific issue?

All you need is to allow multi-select in the listbox. On page submit, get the items selected and based on the items form the query, execute on database and get the result showed in the display (in grid or any other appropriate control.)

Try!


您可以使用列表框的多选功能.
请参见此处的讨论 [ ^ ].
除此之外,如果遇到问题,还需要尝试一些操作并将代码/问题发布到此处.
You can use the multiselect feature of the listbox.
See the discussion here[^].
Beyond that, you need to try something and post your code / problem here if you run into issues.


这篇关于C#列表框与SQL查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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