<DataList><asp:image id="xx" Visible='<%# DataBinder.Eval(Container.DataItem,"col1")=="nothing"?false:true %>' runat=server></DataList>
可是总不能实现,无论是否"nothing",这个image的visible总是true,是啥原因呢?
可是总不能实现,无论是否"nothing",这个image的visible总是true,是啥原因呢?
解决方案 »
- vs发布插件如何卸载
- 购物车
- 如何读取客户端目录下的所有文件?
- ajax提交 访问用户控件问题
- 二级域名?????????
- 100分急求asp.net本地化的解决方案!!!
- 如何设置TextChangeBox 事件
- Button1.Attributes["onclick"] = "this.disabled=true",按钮如何提交.(来者有分)
- 【问】Label控件如何换行显示??
- ###请教关于水晶报表的问题?||水晶报表可以用程序动态的添加行列和精确定位吗?例如发票打印行和列不是固定的,排列也不一致,水晶报
- 一个div问题
- 关于ASP.NET下的刷新后保持页面位置的问题------急啊求求高手们了100分我只有这么多了
<DataList><asp:image id="xx" Visible='<%# GetSign(DataBinder.Eval(Container.DataItem,"col1")) %>' runat=server></DataList>后台代码:
protected string GetSign(string str)
{
if(str == null || str=="")
{
return false;
}
return true;
}