<td colspan= "2 " id= "Arithmetic ">
<SELECT style= "WIDTH: 100% " onchange= "SfChange(this) ">
<OPTION value=a ' <%# Microsoft.VisualBasic.Interaction.IIf(DataBinder.Eval(Container, "DataItem.Arithmetic ")== "a ", "selected ", " ") %> '> a </OPTION>
<OPTION value=b ' <%# Microsoft.VisualBasic.Interaction.IIf(DataBinder.Eval(Container, "DataItem.Arithmetic ")== "b ", "selected ", " ") %> '> b </OPTION>
</SELECT>
</td>
我想要从数据库查出来的是 "a " <OPTION> a </OPTION> 就选中a
数据库查出来的是 "b " <OPTION> b </OPTION> 就选中b
但是这样写不能实现功能
谢谢大家帮忙解决一下吧
------解决方案--------------------------------------------------------
VB
<OPTION value=b <%# Microsoft.VisualBasic.Interaction.IIf((DataBinder.Eval(Container.DataItem, "Arithmetic ")).ToString()= "b ", " selected ", " ")%> > b </OPTION>