dropdownlist 取值
场景:DropDownList获取值的有关问题
DropDownList获取值的问题!
DropDownList控件的Enabled=false这时怎么取值。
DropDownList.SelectItem为空。
------解决方案--------------------
已经enable了 就无法取值
可以在初始化时先指定DropDownList默认的选项为第一项
------解决方案--------------------
那你可以判断下嘛
string value = DropDownList1.Enabled ? DropDownList.SelectItem : string.Empty;
DropDownList获取值的问题!
DropDownList控件的Enabled=false这时怎么取值。
DropDownList.SelectItem为空。
------解决方案--------------------
已经enable了 就无法取值
可以在初始化时先指定DropDownList默认的选项为第一项
------解决方案--------------------
那你可以判断下嘛
string value = DropDownList1.Enabled ? DropDownList.SelectItem : string.Empty;