How can I use conditional statements during data binding [closed]
<div class="oldPrice" <%#if(Eval("OldPrice") == Eval("Price") ){ %> style="display:none" <%}%> >开发者_JAVA百科;
try this
<div class="oldPrice" <%#(Eval("OldPrice") == Eval("Price")? "style='display:none'":String.Empty) %>>
精彩评论