Multi-select dropdown list in ASP.NET

后端 未结 8 2122
梦如初夏
梦如初夏 2020-11-27 04:22

Do any good multi-select dropdownlist with checkboxes (webcontrol) exist for asp.net?

Thanks a lot

8条回答
  •  -上瘾入骨i
    2020-11-27 04:44

    HTML does not support a dropdown list with checkboxes. You can have a dropdown list, or a checkbox list. You could possibly fake a dropdowncheckbox list using javascript and hiding divs, but that would be less reliable than just a standard checkbox list.

    There are of course 3rd party controls that look like a dropdown checkboxlist, but they are using the div tricks.

    you could also use a double listbox, which handles multi select by moving items back and forth between two lists. This has the added benefit of being easily to see all the selected items at once, even though the list of total items is long

    (Imagine a list of every city in the world, with only the first and last selected)

提交回复
热议问题