1.Eval限制字数
<%# Eval("title").ToString().Length > 16 ? Eval("title").ToString().Substring(0, 16) + "..." : Eval("title")%>
2.Eval做判断
2.1与值做判断
<%# Eval("flag").ToString() == "1" ? "CompanyInfolist.aspx" : (Eval("flag").ToString() == "2") ? "company/aaa/web/index.aspx" : (Eval("flag").ToString() == "3") ? "company/bbb/web/index.aspx" : "company/ccc/index.aspx"%>?UID=<%#Eval("infoID")%>
2.2判断为空
<%# string.IsNullOrEmpty(Eval("Companylogo").ToString()) ? "<img src='../E_img/ao.jpg' width='212' height='200' />" : Eval("Companylogo")%>
3.Eval取时间值
<%# Eval("addTime","{0:d}")%>