<%# savevalue(DataBinder.Eval(Container.DataItem,"ok_flag").ToString()) %>
string aaa = string.Empty;
public string savevalue(string myvalue)
{
if(myvalue == "true")
{
return "xx";
}
else
{
return "zz";
}
}
string aaa = string.Empty;
public string savevalue(string myvalue)
{
if(myvalue == "true")
{
return "xx";
}
else
{
return "zz";
}
}
解决方案 »
- 请教多个关键字搜索的解决方案,谢谢
- 怎么提高XML的读写效率?(顶者有分)
- IIS访问时间不一致的诡异问题
- 谁有BS模式的软件模板,(指美工部分)
- 微软首页菜单实现
- 俺是新手问个问题:SQL Server does not exist or access denied
- 求救:xml中的一个xmlnode,怎么知道xmlnode是第几层结点?
- 怎么在.NET連接數據庫
- nhibernate是不是已经死了?
- 请高手帮忙!!!!!!!
- 使用asp.net+C#+Jmail4.3发送email进入长时间等待,最后发送失败。请高手帮忙!
- 怎样将一个datagrid的一行添加到另一个datagrid的行,并绑定。
Text='<%# iif(DataBinder.Eval(Container,"DataItem.Prompt")=true,"是","否") %>'
select (case ispay when 0 then '未付款' when 1 then '已付款' end) as ispay from 你的表
select (case 字段名 when true then '是' when false then '否' end) as ispay from 你的表
void Item_Bound(Object sender, DataGridItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.Item)
{
if(e.Item.cell["your_column"].text == "true")
e.Item.cell["your_column"].text = "是";
else
e.Item.cell["your_column"].text = "否";
}
}
不知对楼主是否有帮助。
select case Result when 'true' then '是' else '否' end as Result,... from ...