DropDownCheckBoxes数据并非全部存储在数据库中 [英] DropDownCheckBoxes data not all stored in database

查看:88
本文介绍了DropDownCheckBoxes数据并非全部存储在数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,有谁可以帮我解决这个问题。我想在我的应用程序中使用 DropDownCheckBoxes ,当我进行多项选择时,我只得到第一个选定的值,其余的值没有出现。你能帮我详细说明如何将所有选定的值存储在数据库中吗?我不知道应该如何将它们存储在数据库中。以下是我从代码背后写的内容。

chList = DropDownCeheckBoxesListControl1.SelectedItem.Text

谢谢。

Hello, can anyone please help me here with this issue. I want to use DropDownCheckBoxes in my application, when I do a multiple selection, I am getting only the first selected value the remaining values are not appearing. Could you please help me on how I should store all the selected values in database? i don't know how I should store them in the database. The following is what I wrote from code behind.
chList= DropDownCeheckBoxesListControl1.SelectedItem.Text
Thank you.

推荐答案

当你在做 DropDownCheckBoxes 时,你必须做一些事情来将CheckBoxes绑定到 DropDownList 项目。



所以,如果你编码以下......

As you are doing DropDownCheckBoxes, so you must be doing something to bind CheckBoxes to the DropDownList items.

So, if you code the following...
chList= DropDownCeheckBoxesListControl1.SelectedItem.Text



总会返回一项。



你需要循环遍历那些 CheckBoxes ,它们被附加到 DropDownList 项目并检查哪一个被选中。这将返回所有选定的项目。


It will always return one item.

You need to loop through those CheckBoxes, which are appended to DropDownList items and check which one are checked. That will return you all the selected items.


这篇关于DropDownCheckBoxes数据并非全部存储在数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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