dropdownlist1的选值想进行数学运算!
textbox组件可以用double text1=double.Parse(TextBox1.Text); 转换为浮点!
那么dropdownlist应该怎样转换那?分很少,帮想想~
------解决方案--------------------------------------------------------
double selectValue =double.Parse(dropdownlist1.SelectValue);
------解决方案--------------------------------------------------------
Convert.ToDouble(dropdownlist1.selected.value.ToString())
------解决方案--------------------------------------------------------
都被说了,只能帮你顶一下了
------解决方案--------------------------------------------------------
jf
------解决方案--------------------------------------------------------
double.Parse(dropdownlist1.SelectValue.ToString())
Convert.ToDouble(dropdownlist1.selected.value.ToString())
这两个都可以的
------解决方案--------------------------------------------------------
double selectValue = Double.Parse(DropDownList1.SelectedValue);
or
double selectValue = Convert.ToDouble(DropDownList1.SelectedValue);