页面上有一个DropDowmList(性别)和一个DataGrid,一个确定按钮,DropDowmList的Items的Text为(男 ,女),value为(0,1),点击确定按钮将DropDowmList的Item的value值存进数据库的表中,
Datagrid显示该表中的内容,怎样操作才能使Datagrid中显示是DropDowmList的Item的value值相对应
的Text 的值
Datagrid显示该表中的内容,怎样操作才能使Datagrid中显示是DropDowmList的Item的value值相对应
的Text 的值
<%# Convert.ToString(DataBinder.Eval(Container, "DataItem.mytitle")) == "1"?"女":"男" %>
VB没有写过,试试看这样行不行.
select sex=case sex when 0 then N"男" else N"女" end from table