从下拉列表中删除特定的值索引 [英] delete a specific index of value from dropdown
本文介绍了从下拉列表中删除特定的值索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何从下拉列表中删除行的特定索引
How can i delete or remove a specific index of row from dropdown
推荐答案
在DropDownList的ListItemCollection上调用RemoveAt:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listitemcollection.removeat.aspx [
Call RemoveAt on the ListItemCollection of the DropDownList:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listitemcollection.removeat.aspx[^]
e.g.
var index = 3;
dropDownList1.Items.RemoveAt(index);
这篇关于从下拉列表中删除特定的值索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文