无法在下拉列表中选择多个项目。 [英] Cannot have multiple items selected in a dropdownlist.
问题描述
我有一个下拉列表,我的绑定值为1到60,默认值为< - Select - >价值。由于某些服务器端代码,我已经解雇了
I have a dropdownlist and i am binding value 1 to 60 and the default value is <--Select--> with value "". I have fired the
OnSelectedIndexChanged
事件。当我要插入一个新的重新编码然后它工作正常但当我更新任何记录然后它显示错误。
event because of some server side code. When i am going to insert a new recode then it working fine but when i am updating any record then it showing error.
Cannot have multiple items selected in a DropDownList.
我尝试过:
我累了
What I have tried:
I have tired
ddl.ClearSelection();
ddl.Items.FindByValue("4").Selected = true;
但是当我想查看记录时应该是在默认模式下。
我已经厌倦了通过在4处提供默认值而在默认模式下显示但显示相同的错误。
But when i want to view a record it should be in Default Mode.
I have tired to show in default mode by providing the Default value in the place of "4" but it showing the same error.
推荐答案
您可以尝试以下链接:
ASP.NET Dropdownlist - 不能在DropDownList中选择多个项目。 | ASP.NET论坛 [ ^ ]
You can try this link:
ASP.NET Dropdownlist - "Cannot have multiple items selected in a DropDownList." | The ASP.NET Forums[^]
这篇关于无法在下拉列表中选择多个项目。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!