Fork me on GitHub

ASP.NET WebForm 如何设置DropDownList的值被选中

在绑定数据源后,设置选中的值

(1) dropdowslist.selectedIndex=索引值(数字);
(2) dropdownlist.Items.findbyvalue(你的值).selected=true  
(3) dropdownlist.Items.findbytext(你的值).selected=true

 

转自https://blog.csdn.net/wangganggang90/article/details/8468027

posted @ 2018-05-31 13:12  秋刀鱼de滋味  阅读(1289)  评论(0编辑  收藏  举报