C# 如何在列表框(asp.net)中添加复选框?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/712809/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can i add checkbox in listbox(asp.net)?
提问by Penguen
How can i add Checkbox in listbox. i want to make it in asp.net .
如何在列表框中添加复选框。我想在 asp.net 中制作它。
采纳答案by James L
You probably want to use CheckBoxList.
您可能想使用CheckBoxList。
回答by Misha N.
Maybe CheckBoxListcan solve the problem?
也许CheckBoxList可以解决问题?
回答by Charlie
Agree with the above, but the specific answer to your question (as far as I am aware) is that you can't. You can only add items which inherit from ListItem. Definitley look to CheckBoxList.
同意上述观点,但您问题的具体答案(据我所知)是您不能。您只能添加从 ListItem 继承的项目。Definitley 看看 CheckBoxList。