62,265
社区成员
发帖
与我相关
我的任务
分享
iif (Eval("o_status"),"a.jpg","b.jpg" )
datatable dt=BindSJ();//从数据库读出的数据
dt.Columns.Add("imgg",typeof(string));
for(int i=0;i<dt.Rows.Count;i++)
{
if(dt.Rows[i]["o_status"].ToString()=="0")
{
dt.Rows[i]["imgg"]="a.jpg";
}
else
{
dt.Rows[i]["imgg"]="b.jpg";
}
}
DataList1.DataSource=dt;
DataList1.DataBind();
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30201: Expression expected.
Source Error:
Line 94: <span lang="en-us">
Line 95: </span>
Line 96: <asp:Image runat="server" ID="Image1" ImageUrl='<%# Eval("o_status").ToString() == "true" ? "a.jpg" : "b.jpg" %>' />
Line 97: <asp:Button ID="btn_payment"
Line 98: runat="server" CommandName="edit"
<asp:Image runat="server" ID="Image1" ImageUrl='<%# Eval("status").ToString() == "True" ? "a.jpg" : "b.jpg" %>' />