数据库里的false如何格式化为"否"? 在GridView中,如何把某一列的记录false值,可是化为否? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <%# Eval("flag")==false?"否":"是" %>好像是这样的,用三目就行了 case 列名when "false" then "否"when "true" then "是" end 大神们,是在gridview里面,不是在页面中啊 用SQL:case 列名when "false" then "否"when "true" then "是" end 绑定的时候 后台databound 里面判断if(((Label)e.row.FindControl("控件ID")).Text="true"){((Label)e.row.FindControl("控件ID")).Text="是";}else{((Label)e.row.FindControl("控件ID")).Text="否";} <%# Eval("flag")==false?"否":"是" %>GRIDVIEW中是一样的。 if(((Label)e.row.FindControl("控件ID")).Text="true"){((Label)e.row.FindControl("控件ID")).Text="是";}else{((Label)e.row.FindControl("控件ID")).Text="否";}在 事件里面写代码 楼主想直接在配置中绑定是有些麻烦,还不如在页面中绑定方便;要么就采用objectdatasource动态绑定数据,不过要写些代码的 <%# Eval("列名")==false?"否":"是" %> 一种方法在页面中:利用模板输入<%# Eval("flag")==false?"否":"是" %>另一中方法在cs中的sql语句里面处理: select id,(case 列名 when "false" then "否"when "true" then "是" end) from table Oracle存储过程一直不通过,总是报缺少右括号,大家给点意见,这个错误经常是什么地方才出错 我要使用excel里面的数据来放在treeview中自动生成数据树 怎样统计当前在线人数? 请问ppt幻灯片如何用ie播放? ASP.NET网站发布版本问题,比较棘手。。。。 第一次遇上的错误:“公共语言运行库检测到无效的程序” 。请大侠帮我。。 有个文学网站想找人写后台,要求有大流量处理经验^^ code128 字体 扫条码扫不出来 请教! 类反射赋值错误 asp 用户控件消失 如何在打开一个静态首页时,先运行一段ASP.NET代码?
好像是这样的,用三目就行了
when "false" then "否"
when "true" then "是" end
when "false" then "否"
when "true" then "是" end
databound 里面判断if(((Label)e.row.FindControl("控件ID")).Text="true")
{
((Label)e.row.FindControl("控件ID")).Text="是";
}
else
{
((Label)e.row.FindControl("控件ID")).Text="否";
}
if(((Label)e.row.FindControl("控件ID")).Text="true")
{
((Label)e.row.FindControl("控件ID")).Text="是";
}
else
{
((Label)e.row.FindControl("控件ID")).Text="否";
}在 事件里面写代码
另一中方法在cs中的sql语句里面处理: select id,(case 列名 when "false" then "否"when "true" then "是" end) from table