asp.net dropdownlist和checkboxlist问题 [英] asp.net dropdownlist and checkboxlist problem
问题描述
亲爱的所有人,
我在dropdownlist和复选框控件方面遇到问题.
在我的应用程序中,我有一个Dropdownlist1,我手动填充了五个项目,例如:...
----选择----
NationalSalesManager值= 1
区域经理值= 2
DepotManager值= 3
AreaManager值= 4
主管值= 5
推销员价值= 6
我想在数据库中的dropdownlist选定事件上填充一个复选框列表-Dropdownlist1_SelectedIndexChanged.
当我选择NationalSalesManager时,国民销售经理表的记录显示在checkBoxlist中,当我从下拉列表中选择RegionalManager时,RegionManager表的记录显示在checkBoxList中,与其他情况相同.
请帮助我.
Dear All,
I Have problems with dropdownlist and checkbox control.
In my application I have one Dropdownlist1 which I fill manually with five items like this...
----select----
NationalSalesManager value=1
RegionalManager value=2
DepotManager value=3
AreaManager value=4
Supervisor value =5
salesman value=6
I want to populate one checkboxlist on the selected event of dropdownlist from the database- Dropdownlist1_SelectedIndexChanged.
When I select the NationalSalesManager then the record of National Sales Manager table display in checkBoxlist, when I select the RegionalManager from dropdownlist then the record of RegionalManager Table display in checkBoxList same as for others.
Please help me.
推荐答案
Clear the items of checkboxlist before rebinding
CheckBoxList1.Items.Clear();
这篇关于asp.net dropdownlist和checkboxlist问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!