问题描述
您好,有谁可以帮我解决这个问题。我想在我的应用程序中使用 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.
推荐答案
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数据并非全部存储在数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!