当前位置: 代码迷 >> ASP.NET >> 不能在 DropDownList 中选择多个项。帮帮小弟~解决办法
  详细解决方案

不能在 DropDownList 中选择多个项。帮帮小弟~解决办法

热度:826   发布时间:2013-02-25 00:00:00.0
不能在 DropDownList 中选择多个项。???????????帮帮小弟~~~~~~~~
错误:   不能在   DropDownList   中选择多个项


ListItem   item   =   new   ListItem();
                 
                for   (Int64   i   =   1;   i   <3;   i++)
                {
                     
                        item.Text   =   "第 "   +   i.ToString()   +   "页 ";
                        item.Value   =   i.ToString()   ;
                        dyeshu.Items.Add(item);
       
                }
                dyeshu.ClearSelection();

------解决方案--------------------------------------------------------
你设置他的mutilySelect = true了么
------解决方案--------------------------------------------------------
DropDownList 不能多选。。

你要多选就用ListBox
------解决方案--------------------------------------------------------
dyeshu.ClearSelection(); 如果你用这个方法,必须将dyeshu.Items里的项Selected设置为false
------解决方案--------------------------------------------------------
本来就不能多选的啊
------解决方案--------------------------------------------------------
<select id= "aaa " multiple >
  相关解决方案