I am trying to create an If that has the condition that, if the eval value is 0 the div wont appear.
<%@ if (DataBinder.Eval(Container.DataItem, "Desconto").ToString() != "0"){ %>
<p><span class="oldprice"><%# Eval("Preço") %>€</span> <i class="newprice item_price"><%# ((decimal)Eval("Preço")-(decimal)Eval("Preço")*((decimal)(int)Eval("Desconto")/100)).ToString("N2") %></i>€</p>
<%@ } %>
But i am not figuring out the syntax to create the eval, it aways ends up as some error.
Thanks in advance for reply.
Aucun commentaire:
Enregistrer un commentaire