我想在使用asp.net的eval中使用嵌套if条件 例如
<%# ((string)Eval("deviceName")) == "1,1"
? "Mobile, Portal" == "1,0"
? "Mobile" == "0,1"
? "Portal"
: "None" %>
答案 0 :(得分:0)
<%# ((string)Eval("deviceName")) == "1,1" ? "<span class='icon-mobile' style='font-size:50px'> <span class='icon-desktop' style='font-size:40px'>" : ((string)Eval("deviceName")) == "1,0" ? "<span class='icon-mobile' style='font-size:50px'>" : ((string)Eval("deviceName")) == "0,1" ? "<span class='icon-desktop' style='font-size:40px'>" : "-- Not Specified --" %>