【发布时间】:2012-01-20 14:21:14
【问题描述】:
我正在创建一个页面,我需要在其中显示一个下拉列表。从此下拉列表中,用户可以选择多个值。我知道我可以使用如下复选框列表:
<asp:CheckBoxList ID="CheckBoxList1" runat="server" style="margin-right: 158px">
<asp:ListItem>Value 1</asp:ListItem>
<asp:ListItem>Value 2</asp:ListItem>
<asp:ListItem>Value 3</asp:ListItem>
<asp:ListItem>Value 4</asp:ListItem>
</asp:CheckBoxList>
但是如果有超过 50 个左右的值,那么这将占用页面上的大量空间并且看起来很奇怪。请告诉我如何从下拉列表中选择多个值,或者是否有其他选择,以便我可以选择多个值并在最小空间而不是网格上显示许多记录?
【问题讨论】:
标签: asp.net vb.net visual-studio-2010 c#-4.0