为dropdownlist中的每个项添加复选框 [英] add checkbox for each item in dropdownlist

查看:74
本文介绍了为dropdownlist中的每个项添加复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



i有一个下拉列表,我将其动态添加到页面

这样的事情:

dim drp as new dropdown list

...

i意味着page.aspx中没有任何内容

现在我想完全用代码创建一个checkboxdropdownlist

i阅读相关帖子,但没有一个完全在代码背后我的意思是所有这些都在page.aspx中添加了一个下拉列表,但我在page.aspx中没有任何内容。所有必须在代码后面完成



提前感谢

hi
i have a dropdownlist that i add it to page dynamically
something like this :
dim drp as new dropdown list
...
i mean there is nothing in page.aspx
now i want to create a checkboxdropdownlist totally in code behind
i read related posts but none of them was totally in code behind i mean all of them add a dropdown in page.aspx but i have nothing in page.aspx . all must be done in code behind

thanks in advance

推荐答案

在代码中声明一个组合框然后将它添加到窗口的子项中,以便将控件添加到窗口中。
declare a combobox in code and then add it to the window's children items, so that the control will be added to the window.


试试这可能对你有帮助





多选DropDownList(a DropDownList内的CheckBoxList) [ ^ ]
try this this may help you


A Multiple Selection DropDownList (a CheckBoxList Inside a DropDownList)[^]


这篇关于为dropdownlist中的每个项添加复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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